Data Modification in Mendix 8 Published OData Service

1
Hi, I’m building a proof of concept OData service in Mendix 8. The metadata for this service is below. I’ve exposed multiple entities and been able to query them just fine. But, I don’t see anywhere in the documentation on how to perform data modification.  I know that Odata 3 services aren’t required to expose data modification functionality. Also, according to Odata3 documentation, these types of requests should contain “valid entity representation.” However, there isn’t anywhere in the docs that specify what a valid entity representation is. Do Mendix exposed Odata services allow data creation/modification/deletion? Is there any documentation on valid entity representation for these types of requests?   <?xml version="1.0" encoding="UTF-8"?> <edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:mx="http://www.mendix.com/Protocols/MendixData" Version="1.0"> <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0"> <Schema xmlns="http://schemas.microsoft.com/ado/2009/11/edm" Namespace="DefaultNamespace"> <EntityType Name="Agent"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Nullable="false" Type="Edm.Int64" mx:isAttribute="false"/> <Property Name="AgentId" Type="Edm.Int64"/> <Property Name="Status" Type="Edm.String"/> <NavigationProperty FromRole="Agent" Name="FLQAInformation" Relationship="DefaultNamespace.FLQAInformation_Agent" ToRole="FLQAInformation"/> <NavigationProperty FromRole="Agents" Name="Fees" Relationship="DefaultNamespace.Fee_Agent" ToRole="Fees"/> <NavigationProperty FromRole="Agent" Name="OpenCommunicationSubscription" Relationship="DefaultNamespace.OpenCommunicationSubscription" ToRole="OpenCommunicationSubscription"/> <NavigationProperty FromRole="Agent" Name="ClosedCommunicationSubscription" Relationship="DefaultNamespace.ClosedCommunicationSubscription" ToRole="ClosedCommunicationSubscription"/> </EntityType> <EntityType Name="FLQAInformation"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Nullable="false" Type="Edm.Int64" mx:isAttribute="false"/> <Property Name="FLQABump" Type="Edm.Int64"/> <Property Name="FLQABumpStartDateTime" Type="Edm.DateTimeOffset"/> <Property Name="FLQABumpEndDateTime" Type="Edm.DateTimeOffset"/> <NavigationProperty FromRole="FLQAInformation" Name="Agent" Relationship="DefaultNamespace.FLQAInformation_Agent" ToRole="Agent"/> </EntityType> <EntityType Name="Fee"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Nullable="false" Type="Edm.Int64" mx:isAttribute="false"/> <Property MaxLength="200" Name="Name" Type="Edm.String"/> <NavigationProperty FromRole="Fees" Name="Agents" Relationship="DefaultNamespace.Fee_Agent" ToRole="Agents"/> </EntityType> <EntityType Name="CommunicationSubscription"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Nullable="false" Type="Edm.Int64" mx:isAttribute="false"/> <NavigationProperty FromRole="CommunicationSubscription" Name="Addresss" Relationship="DefaultNamespace.Address_CommunicationSubscription" ToRole="Addresss"/> </EntityType> <EntityType Name="Address"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Nullable="false" Type="Edm.Int64" mx:isAttribute="false"/> <Property MaxLength="200" Name="Line1" Type="Edm.String"/> </EntityType> <Association Name="FLQAInformation_Agent"> <End Multiplicity="0..1" Role="FLQAInformation" Type="DefaultNamespace.FLQAInformation"/> <End Multiplicity="0..1" Role="Agent" Type="DefaultNamespace.Agent"/> </Association> <Association Name="Fee_Agent"> <End Multiplicity="*" Role="Fees" Type="DefaultNamespace.Fee"/> <End Multiplicity="*" Role="Agents" Type="DefaultNamespace.Agent"/> </Association> <Association Name="OpenCommunicationSubscription"> <End Multiplicity="0..1" Role="OpenCommunicationSubscription" Type="DefaultNamespace.CommunicationSubscription"/> <End Multiplicity="0..1" Role="Agent" Type="DefaultNamespace.Agent"/> </Association> <Association Name="ClosedCommunicationSubscription"> <End Multiplicity="0..1" Role="ClosedCommunicationSubscription" Type="DefaultNamespace.CommunicationSubscription"/> <End Multiplicity="0..1" Role="Agent" Type="DefaultNamespace.Agent"/> </Association> <Association Name="Address_CommunicationSubscription"> <End Multiplicity="*" Role="Addresss" Type="DefaultNamespace.Address"/> <End Multiplicity="0..1" Role="CommunicationSubscription" Type="DefaultNamespace.CommunicationSubscription"/> </Association> <EntityContainer Name="v1Entities" m:IsDefaultEntityContainer="true"> <EntitySet EntityType="DefaultNamespace.Agent" Name="Agents"/> <EntitySet EntityType="DefaultNamespace.FLQAInformation" Name="FLQAInformations"/> <EntitySet EntityType="DefaultNamespace.Fee" Name="Fees"/> <EntitySet EntityType="DefaultNamespace.CommunicationSubscription" Name="CommunicationSubscriptions"/> <EntitySet EntityType="DefaultNamespace.Address" Name="Addresses"/> <AssociationSet Association="DefaultNamespace.FLQAInformation_Agent" Name="FLQAInformation_Agent"> <End EntitySet="FLQAInformations" Role="FLQAInformation"/> <End EntitySet="Agents" Role="Agent"/> </AssociationSet> <AssociationSet Association="DefaultNamespace.Fee_Agent" Name="Fee_Agent"> <End EntitySet="Fees" Role="Fees"/> <End EntitySet="Agents" Role="Agents"/> </AssociationSet> <AssociationSet Association="DefaultNamespace.OpenCommunicationSubscription" Name="OpenCommunicationSubscription"> <End EntitySet="CommunicationSubscriptions" Role="OpenCommunicationSubscription"/> </AssociationSet> <AssociationSet Association="DefaultNamespace.ClosedCommunicationSubscription" Name="ClosedCommunicationSubscription"> <End EntitySet="CommunicationSubscriptions" Role="ClosedCommunicationSubscription"/> </AssociationSet> <AssociationSet Association="DefaultNamespace.Address_CommunicationSubscription" Name="Address_CommunicationSubscription"> <End EntitySet="Addresses" Role="Addresss"/> </AssociationSet> </EntityContainer> </Schema> </edmx:DataServices> </edmx:Edmx>  
asked
1 answers
2

Steven,

Section 8 of this documentation page (https://docs.mendix.com/refguide/published-odata-resource) Indicates that the ability to update via exposed OData Resources was introducted in version 9.6 of Mendix.  This documentation page describes how to update via OData (https://docs.mendix.com/refguide/odata-query-options#updating-objects).  It seems you’ll need to upgrade your app to be able to update via OData.

Hope that helps,

Mike

answered