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-1603) It is not clear if the entities in a collection returned by a function always have an entity-id


Garrett DeBruin created ODATA-1603:
--------------------------------------

             Summary: It is not clear if the entities in a collection returned by a function always have an entity-id
                 Key: ODATA-1603
                 URL: https://issues.oasis-open.org/browse/ODATA-1603
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: Protocol
            Reporter: Garrett DeBruin


A function can return a collection of an entity where that entity does not have a key defined. Keys are only required for [entity sets and multivalued navigation properties](https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#_Toc38530354):

Â>ÂIn order to be specified as the type of an entity set or a collection-valued containment navigation property, the entity type MUST either specify a key or inherit its key from its base type.
[The standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_EntityIdsandEntityReferences) also says:

> entities are also uniquely identified by a durable, opaque, globally unique entity-id
> ...
> Services are strongly encouraged to use the canonical URL for an entity

So, my conclusion is that an entities returned in a collection by a function should have entity-ids. However,Âlooking at how to create the canonical URL for an entity, the [standard says this](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_CanonicalURL):

> the canonical form of an absolute URL identifying a non-contained entity is formed by adding a single path segment to the service root URL. The path segment is made up of the name of the entity set associated with the entity followed by the key predicate identifying the entity within the collection.

It appears that an assumption is made that non-contained entities must exist within an entity set. However, entities that only exist as the result of a function may not have any entity set defined. So, it appears that there is no entity-id for the entities returned from a function, despite the standard declaring that entities have a durable, opaque, globally unique entity-id which can be exposed by following the canonical URL conventions.



--
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]