OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1558) Define semantics for navigation properties of type Edm.EntityType


Michael Pizzo created ODATA-1558:
------------------------------------

             Summary: Define semantics for navigation properties of type Edm.EntityType
                 Key: ODATA-1558
                 URL: https://issues.oasis-open.org/browse/ODATA-1558
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: New Feature
          Components: Protocol
    Affects Versions: V4.01_OS
         Environment: [Proposed]
            Reporter: Michael Pizzo
             Fix For: V4.01_ERRATA01


[OData Common Schema Definition Language (CSDL) XML Representation Version 4.01 (oasis-open.org)|https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#sec_BuiltInAbstractTypes] defines the behavior for Edm.EntityType. It specifically disallows use of Edm.EntityType as the type of an EntitySet, because all instances within an entity set must have the same key. However, it leaves open the ability to use Edm.EntityType as the entity type of a navigation property. And, indeed,ÂODATA-1552 updates the xsd to allow navigation properties of type Edm.EntityType.

What is missing is a description of the semantics of a navigation property whose type is Edm.EntityType. Specifically, since Edm.EntityType doesn't define a key, it's not possible to index into a navigation property of type Edm.EntityType by key *unless you insert a cast segment*.

This is ramification is implied by other rules (so calling it out is not a breaking change) but it should be explicitly called out so that the user doesn't have to derive the semantics from the existing rules.

We do separately have a rule that requires a collection-valued containment navigation property define a key (and thus, Edm.EntityType cannot be used as the type of a collection-valued containment navigation property):

"For a collection-valued containment navigation property the specified entity type MUST have aÂ[key|https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#sec_Key]Âdefined.";

This is consistent with entitysets, which disallow the use of Edm.EntityType "because all entities in an entity set must have the same key fields to uniquely identify them within the set".

Are there any other semantics of a (collection-valued) navigation property of Edm.EntityType that need to be spelled out?

Also note that, in general, if there is no navigation property binding for a non-containment collection-valued navigation property, the key may not uniquely identify the instance. This has nothing to do with Edm.EntityType, and we may want to decide to open a separate issue to track, it just came up in scope of the discussion.Â



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]