If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.

OData Representation

Last modified: February 18, 2025

This document describes how entities are represented in a published OData service.

Attributes

Mendix Data TypeEdm TypeAttribute ValueAtom XML Representation
Id ¹ ²Edm.Int6439406496739543873940649673954387
AutonumberEdm.Int6411
Binary (not supported) ³
BooleanEdm.Booleantruetrue
Date and timeEdm.DateTimeOffsetFri, 19 Dec 2014 10:27:27 GMT2014-12-19T10:27:27.000Z
EnumerationEdm.StringColor.BlueBlue
Big decimalEdm.Decimal0.33333333333333333333333333333333330.3333333333333333333333333333333333
Hashed stringEdm.StringHashPasswordHashPassword
IntegerEdm.Int645050
Long ²Edm.Int6439406496739543873940649673954387
String ⁴Edm.StringJohnJohn

¹ In the service's metadata, IDs are marked with isAttribute="false" (using a Mendix-specific XML attribute in the http://www.mendix.com/Protocols/MendixData namespace) in order to indicate that these are not attributes that appear in the domain model. Note: the isAttribute="false" feature was introduced in Studio Pro 8.6.0.
² When using Excel to import an OData source, long numbers may seem cut off. This is due to a restriction in the data type Microsoft uses. For more information, see Last digits are changed to zeroes when you type long numbers in cells of Excel.
³ Even though the binary data type is not supported, the FileDocument and Image system entities are supported and represented as Base64-encoded strings with the Edm.Binary type.
⁴ When the string attribute has a limited length, the MaxLength attribute is specified. Note: this feature was introduced in Studio Pro 8.16.0.

Additionally, the updated field for an entry in OData comes from the system changedDate attribute of an entity. If this attribute is not available (because it is not exposed, the user does not have access rights, or it is empty in database), the default date (1-1-1970) will be used.

Associations

In the settings of the OData service, you can choose how associations are represented. There are two options, which are described below.

When you choose to represent associations as links, each object contains a link for each of its associations. The associated object(s) can be retrieved via those links.

This means that you can only expose an association when the entity on the other side is a resource of this service as well. This also means that you cannot publish the same entity more than once in the same service (because in that case, it would not be clear where the link should point to).

Using this method, you can expose both sides of the association and you can expose many-to-many associations.

As an Associated Object ID

When you choose to represent associations as an associated object ID, the ID of the associated object is represented as an Edm.Int64 property. If the association refers to more than one object, you can not expose it from that side.