Entity Type An entity type is represented as a member of the document object whose name is the name of the entity type and whose value is an object. The value object MUST contain the member $kind with a string value of EntityType. It MAY contain the members , , , , and . It also MAY contain members representing and as well as . Example : a simple entity type "org.example.Employee": { "$kind": "EntityType", "$Key": [ "ID" ], "ID": { "$Nullable": false }, "FirstName": { "$Nullable": false }, "LastName": { "$Nullable": false }, "Manager": { "$kind": "NavigationProperty", "$Type": "org.example.Manager" } } Example : a derived entity type based on the previous example "org.example.Manager": { "$kind": "EntityType", "$BaseType": "org.example.Employee", "AnnualBudget": { "$Type": "Edm.Decimal" }, "Employees": { "$kind": "NavigationProperty", "$isCollection": true, "$Type": "org.example.Employee" } } Member $Key The of $Key is an array with one item per key property. Key properties without a key are represented as strings containing the property name. Key properties with a key alias are represented as objects with one member whose name is the key alias and whose value is a string containing the path to the property.
Entity Type An entity type is represented as a member of the document object whose name is the name of the entity type and whose value is an object. The value object MUST contain the member $kind with a string value of EntityType. It MAY contain the members , , , , and . It also MAY contain members representing and as well as . Example : a simple entity type "org.example.Employee": { "$kind": "EntityType", "$Key": [ "ID" ], "ID": { "$Nullable": false }, "FirstName": { "$Nullable": false }, "LastName": { "$Nullable": false }, "Manager": { "$kind": "NavigationProperty", "$Type": "org.example.Manager" } } Example : a derived entity type based on the previous example "org.example.Manager": { "$kind": "EntityType", "$BaseType": "org.example.Employee", "AnnualBudget": { "$Type": "Edm.Decimal" }, "Employees": { "$kind": "NavigationProperty", "$isCollection": true, "$Type": "org.example.Employee" } } Member $Key The of $Key is an array with one item per key property. Key properties without a key are represented as strings containing the property name. Key properties with a key alias are represented as objects with one member whose name is the key alias and whose value is a string containing the path to the property.
odata-csdl-json-v4.01-wd01-2017-02-15.docx