Saltar al contenido principal
Versión: 20 R5 BETA

$savedorderby

Saves the order by defined by $orderby when creating an entity set (e.g., $savedorderby="{orderby}")

Descripción

Cuando se crea un conjunto de entidades, se puede guardar el sentido de la ordenación junto con el filtro utilizado para su creación como medida de seguridad. If the entity set that you created is removed from 4D Server's cache (due to the timeout, the server's need for space, or your removing it by calling $method=release).

You use $savedorderby to save the order you defined when creating your entity set, you then pass $savedorderby along with your call to retrieve the entity set each time.

Si el conjunto de entidades ya no está en la caché de 4D Server, se recreará con un nuevo tiempo de espera de 10 minutos por defecto. If you have used both $savedfilter and $savedorderby in your call when creating an entity set and then you omit one of them, the new entity set, having the same reference number, will reflect that.

Ejemplo

You first call $savedorderby with the initial call to create an entity set:

GET /rest/People/?$filter="lastName!=''"&$savedfilter="lastName!=''"&$orderby="salary"&$savedorderby="salary"&$method=entityset

Luego, cuando acceda a su conjunto de entidades, escriba lo siguiente (utilizando tanto $savedfilter como $savedorderby) para asegurarse de que el filtro y su orden de clasificación siempre existen:

GET /rest/People/$entityset/AEA452C2668B4F6E98B6FD2A1ED4A5A8?$savedfilter="lastName!=''"&$savedorderby="salary"