You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OData properties of type Collection(Edm.X) have no direct Mendix
equivalent. Studio Pro models them as a non-persistent entity holding
the values, plus an association from the parent. For TripPin this
adds the TripTag entity for Trip.Tags = Collection(Edm.String).
This commit:
- Adds the TripTag-style NPE flow: walk each entity's properties,
detect Collection(Edm.X), create a non-persistent entity using
Rest\$ODataPrimitiveCollectionEntitySource, with one attribute
carrying Rest\$ODataMappedPrimitiveCollectionValue.
- Creates the parent → NPE association using a brand-new source type
Rest\$ODataPrimitiveCollectionAssociationSource (a marker type with
no fields, paired with the NPE's source type).
- Skips primitive collection NPEs whose parent is persistable: Mendix
forbids associations from a persistable to a non-persistable entity
(CE0001), and Studio Pro doesn't create them either (Person.Emails
is dropped, but Trip.Tags becomes TripTag because Trip is itself
non-persistable).
- Formats the RemoteType the way Studio Pro stores it for primitive
collections, e.g. "Collection([Edm.String Nullable=False Unicode=True])".
- Sets per-attribute Updatable based on whether the parent is a
top-level entity-set entity (false, matching service capabilities)
or a derived/contained entity-type source (true).
Writer/parser additions:
- The "is external entity" check used by serializeAttribute now also
recognises Rest\$ODataEntityTypeSource and
Rest\$ODataPrimitiveCollectionEntitySource so attributes on derived
and primitive-collection entities serialize as Rest\$ODataMappedValue
/ Rest\$ODataMappedPrimitiveCollectionValue instead of StoredValue.
- serializeAssociation handles the new
Rest\$ODataPrimitiveCollectionAssociationSource source type.
- parseAttributeValue and parseAssociation round-trip both new types.
Validated against TripPin: 10 entities matching Studio Pro's
TripPinTest2 reference exactly. mx check error count down to 7, all
remaining are CE6630 from unparsed OData Capabilities annotations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments