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-959) Allow path in an edm:key to also use a primitive property of a non null-able navigation property (recursively) of the entity type.


     [ https://issues.oasis-open.org/browse/ODATA-959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Pizzo updated ODATA-959:
--------------------------------

    Proposal: 
Allow the path expression to include references to primitive properties of non null-able navigation properties (recursively).

8.3.1 Attribute Name could be simply amended as in:
The edm:PropertyRef element MUST specify a value for the Name attribute which MUST be a path expression resolving to a primitive property of the entity type itself or to a primitive property of a complex or a single-valued, non-nullable navigation property (recursively) of the entity type. The names of the properties in the path are joined together by forward slashes.

Semantics:
In JSON payloads:
1)	The id must be written, even in minimal metadata, or
2)	The nav properties must be expanded to include at least the related ids (service *could* default expand to include the related id fields.)
You can only create the entity if:
a.	You include a link to an existing related entity containing the key value, or 
b.	You do a deep insert that includes the related entity
You can't change the relationship to the related entity containing the key value (so it would have to be single, non-nullable, and immutable)
The referenced property(ies) on the related entity must be immutable and must be unique (i.e., are generally a key of the related entity)
Deleting the related entity deletes the entity whose key referenced a property of that entity


  was:
Allow the path expression to include references to primitive properties of non null-able navigation properties (recursively).

8.3.1 Attribute Name could be simply amended as in:
The edm:PropertyRef element MUST specify a value for the Name attribute which MUST be a path expression resolving to a primitive property of the entity type itself or to a primitive property of a complex or a single-valued, non-nullable navigation property (recursively) of the entity type. The names of the properties in the path are joined together by forward slashes.


> Allow path in an edm:key to also use a primitive property of a non null-able navigation property (recursively) of the entity type.
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-959
>                 URL: https://issues.oasis-open.org/browse/ODATA-959
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL
>    Affects Versions: V4.0_ERRATA03
>         Environment: Proposed
>            Reporter: Hubert Heijkers
>             Fix For: V4.01_WD01
>
>
> Currently a key can only be made up of properties that are either in the entity type directly or in a complex property recursively. It therefore explicitly excludes the use of these properties in a, non null-able, navigation property. This causes the modeler to expose the underlying data structure as he'll have to add these primitive properties to the entity directly and keeping them in sync using referential constraints.
> An example that shows this would be a situation like in graphs where nodes are connected by edges and where an edge gets particular properties associated to it. Here the edge will have to, apart from the two navigation properties representing the nodes it is connecting also two primitive properties that contain the node IDs to be able to form a key for an edge.
> Obviously many m-n relationships exist which have additional properties describing the relationship exist that would benefit.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


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