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-674) Specify navigation property binding combined with containment


    [ https://issues.oasis-open.org/browse/ODATA-674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62874#comment-62874 ] 

Michael Pizzo edited comment on ODATA-674 at 7/7/16 1:58 PM:
-------------------------------------------------------------

Discussion from 2016-7-7:
-Hubert wants to be able to annotate that, wherever a particular type is used, the contents of one nav prop are found in another (containment) nav prop. 
-For containment navigation properties, since the type definition defines the storage it might be reasonable to have the navpropbinding be on the type, rather than the entity set. This would not be desireable for navpropbindings for non-containment properties.
-Question on what the target is relative to. Is it relative to the terminus of the path (probably intended and desireable for navpropbindings on an entity set) or is it relative to "wherever the navpropbinding is applied" (which would work well for Hubert's case).  Could perhaps address Huberts case by allowing the path within the target element to include things like ".." for "up one level" and "." for "start at the root".
-IN ANY CASE, we need to clarify the existing text around use with containment nav props in particular, and provide examples.

Mike and Hubert will sync offline to go through some examples and create a proposal.


was (Author: mikep):
Discussion from 2016-7-7:
-Hubert wants to be able to annotate that, wherever a particular type is used, the contents of one nav prop are found in another (containment) nav prop. 
-For containment navigation properties, since the type definition defines the storage it might be reasonable to have the navpropbinding be on the type, rather than the entity set. This would not be desireable for navpropbindings for non-containment properties.
-Question on what the target is relative to. Is it relative to the terminus of the path (probably intended and desireable for navpropbindings on an entity set) or is it relative to "wherever the navpropbinding is applied" (which would work well for Hubert's case).  Could perhaps address Huberts case by allowing the path within the target element to include things like ".." for "up one level" and "." for "start at the root".
-IN ANY CASE, we need to clarify the existing text around use with containment nav props in particular, and provide examples.

> Specify navigation property binding combined with containment
> -------------------------------------------------------------
>
>                 Key: ODATA-674
>                 URL: https://issues.oasis-open.org/browse/ODATA-674
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: Implementing OData, OData CSDL
>    Affects Versions: V4.0_OS
>         Environment: Proposed
>            Reporter: Ralf Handl
>            Assignee: Ralf Handl
>              Labels: Gap, request_tc_discussion
>             Fix For: V4.01_WD01
>
>
> This combination is not explicitly covered in the specification.
> There are two sides to this problem: 
> - target entity sets for contained entities
> - contained entity sets as target entity sets
> Both problems can be solved by allowing <NavigationPropertyBinding> elements as children of the structured type that defines the containment navigation property.
> Example 1: navigation property of a contained entity targets a top-level entity set:
>   <NavigationProperty Name="Items" Type="Collection(Model.OrderItem)" ContainsTarget="true" />
>   <NavigationPropertyBinding Path="Items/Product" Target="Model.Container/Products"/>
> Example 2: assume an Order contains Items and Shipments, and an Item refers to a single Shipment of the same Order and vice versa. Using paths that start at the type defining the containment navigation property, the Target would be "Shipments" and "Items".
> <EntityType Name="Order">
>   <NavigationProperty Name="Items" Type="Collection(Model.OrderItem)" ContainsTarget="true" />
>   <NavigationPropertyBinding Path="Items/Shipment" Target="Shipments"/>  
>   <NavigationProperty Name="Shipments" Type="Collection(Model.Shipment)" ContainsTarget="true" />
>   <NavigationPropertyBinding Path="Shipments/ShippedItems" Target="Items"/>
> </EntityType>
> <EntityType Name="OrderItem">
>   <NavigationProperty Name="Shipment" Type="Model.Shipment" Partner="ShippedItems"/>
> </EntityType>
> <EntityType Name="Shipment">
>   <NavigationProperty Name="ShippedItems" Type="Collection(Model.OrderItem)" Partner="Shipment"/>
> </EntityType>



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