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=63740#comment-63740 ] 

George Ericson commented on ODATA-674:
--------------------------------------

Additional thoughts:

The underlying problem is created by having two separate types of syntax for specifying essentially the same thing, with the difference being scope.  To explain:
•	EntitySet defines a set of instances in the scope of the OData service. 
•	Singleton defines an instance in the scope of the OData service.
•	A NavigationPointer with ContainsTarget=true and specified as a Collection defines a set of instances in the scope of a particular entity within the OData service.   This could be replaced by an EntitySet declaration in the containing EntityType or ComplexType declaration if the syntax allowed it.
•	A NavigationPointer with ContainsTarget=true and not specified as a Collection defines an instance in the scope of a particular entity within its OData service.   This declaration could be replaced by a Singleton declaration in containing the EntityType or ComplexType declaration if the syntax allowed it.

The request to allow the NavigationPropertyBinding syntax in the context of a NavigationProperty completes the functional equivalence.  Also to explicitly allow this property to be named as an EntitySet referenced by EntitySetPath of Action and Function.  

Consider allowing EntitySet and Singleton declarations within EntityType and ComplexType declarations.  Ultimately ContainsTarget could then be deprecated.



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