Mapping of Fabasoft Cloud Objects to OData Entities
The input data are always objects in the Fabasoft Cloud. The OData service has the following strategy to map objects and attributes of objects to the OData entities and OData properties.
Mapping of Names
Depending if you have checked if you have checked the “Use Programming Names” option when creating an OData service, the names are generated differently.
“Use Programming Names” Option
When “Use Programming Names” is checked, the internal reference names of Fabasoft Cloud objects and attributes are used as seen in this screenshot of the JSON output of the OData service:
If the option is not checked, the display names in the language select in the OData service is used.
The following rules apply:
- Special characters including whitespaces are replaced by an underscore.
- Leading and trailing whitespaces are not trimmed, the normal replacing logic applies.
Attribute Value Generation
Values of attributes in the Fabasoft Cloud are mapped into a value in OData. Here the following rules apply:
- Basic data types are mapped directly. Integer types get an integer type in OData. String types get a string type in OData.
- The only exception here is the basic type “Currency” as this is also an aggregate where special rules apply (see next point).
- Lists are mapped directly into OData/JSON lists.
- Aggregates are flattened out. That happens by concatenating the aggregate name with the attribute name with an underscore as separator.
So, if you have an aggregate named Lock Information and there inside the attributes Is Locked, Locked By and Locked Since it will look like that:
Important is, that these 3 properties are only here, if the Lock Information aggregate is set at all. So, it if is null, these 3 properties won’t be in the result set.
- Currencies are aggregates as well. They are flattened out with the two options currvalue and currsymbol so if you have a currency data type on an attribute Price it could look like that: