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: RE: [odata] [OASIS Issue Tracker] (ODATA-1558) Define semantics for navigation properties of type Edm.EntityType


Another way to think about EDM.EntityType is as an 'Abstract' superclass of all other EntityTypes.  Any Entity belonging to an EntitySet or Singleton must have a non-abstract EntityType.

There is no conflict with collections, since a containment navigation property must be associated with an implicit or explicit EntitySet or Singleton.

 

A comment on this note: 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.

The key must uniquely identify an instance in its container (EntitySet or Singleton).  However, there is no requirement that each key value is unique across all containers. Therefore, a key value may not be unique in the collection, since entities in multiple containers might be referenced through a collection-valued navigation property.   

 

George

 

-----Original Message-----
From: odata@lists.oasis-open.org <odata@lists.oasis-open.org> On Behalf Of OASIS Issues Tracker
Sent: Thursday, November 10, 2022 12:50 PM
To: odata@lists.oasis-open.org
Subject: [odata] [OASIS Issue Tracker] (ODATA-1558) Define semantics for navigation properties of type Edm.EntityType

 

 

[EXTERNAL EMAIL]

 

Michael Pizzo created ODATA-1558:

------------------------------------

 

             Summary: Define semantics for navigation properties of type Edm.EntityType

                 Key: ODATA-1558

                 URL: https://urldefense.com/v3/__https://issues.oasis-open.org/browse/ODATA-1558__;!!LpKI!jx5JDWFOhbU0-V4sbi2OGAVu0doInreKz9pgNmZ8bGu3vI_dERO6q4fNREqfVbyhqGIAAxkhSGMpCg_gwopU_DBPZgfw6pdxxH4Yww$  [issues[.]oasis-open[.]org]

             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://urldefense.com/v3/__https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html*sec_BuiltInAbstractTypes__;Iw!!LpKI!jx5JDWFOhbU0-V4sbi2OGAVu0doInreKz9pgNmZ8bGu3vI_dERO6q4fNREqfVbyhqGIAAxkhSGMpCg_gwopU_DBPZgfw6pdwC18QzQ$  [docs[.]oasis-open[.]org]] 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://urldefense.com/v3/__https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html*sec_Key__;Iw!!LpKI!jx5JDWFOhbU0-V4sbi2OGAVu0doInreKz9pgNmZ8bGu3vI_dERO6q4fNREqfVbyhqGIAAxkhSGMpCg_gwopU_DBPZgfw6pcuJ0oplA$  [docs[.]oasis-open[.]org]] 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)

 

---------------------------------------------------------------------

To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail.  Follow this link to all your TCs in OASIS at:

https://urldefense.com/v3/__https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php__;!!LpKI!jx5JDWFOhbU0-V4sbi2OGAVu0doInreKz9pgNmZ8bGu3vI_dERO6q4fNREqfVbyhqGIAAxkhSGMpCg_gwopU_DBPZgfw6pcF46Jt_g$  [oasis-open[.]org]

 



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