Skip to content

Projections and OData Provider

Projections are the means of developing OData services for IFS Cloud. What is defined as a "Projection" in IFS Developer studio gets deployed as an OData service facilitated by IFS OData Provider. Projection is the place where IFS Business entities are remodelled in OData context.

Projection in Database

Figure 1 - What becomes of a projection

Projection Metadata Cache

To improve the response time, OData Provider caches the projection metadata once it is loaded from the database. While maintaining the cache OData Provider needs to make sure that the cached metadata is up-to-date. To do this Odata Provider validated the cached metadata version with that of the database each time when serving a request. If the validation fails, the request will fail with HTTP response code 500 and the response body will contain the error code as MI_MODIFIED_ERROR. Then OData-Provider will invalidate the cached metadata, forcing it to be fetched from the database at the next request.

Response:

{
  "error": {
    "code": "MI_MODIFIED_ERROR",
    "message": "Service metadata already modified."
  }
}

When a user gets this error response the OData-Provider expect the user to retry the same request again. Then OData-Provider will load the latest projection metadata from the database and serve the request accordingly.