OData TC meeting #181 Thursday July 13, 2017

Acting chair: Ralf

Chat transcript from room: odatatc
2017-0713 800-1000 PDT

1. Roll call

1.1 Members present

    George Ericson (Dell)
    Hubert Heijkers (IBM)
    Mark Biamonte (Progress Software)
    Matthew Borges (SAP SE) a.k.a. Matt
    Michael Pizzo (IBM) a.k.a. Mike
    Ralf Handl (SAP SE)
    Ramesh Reddy (Red Hat)
    Stefan Hagen (Individual)

Quorum achieved. Details cf. normative attendance sheet for this meeting (event_id=43986).

Notes taken by all and subsequently edited for readability by Stefan.

2. Approve agenda

Ralf: 5.2 ODATA-1092 Navigation Property Binding (public comment c201707e0004)

Agenda is approved as published with above additions.

3. Approve minutes from previous meeting(s)

3.1 Minutes from July 06, 2017 TC meeting #180


Minutes approved unchanged as published.

4. Review action items [Link to Action item list]

4.1 Action items due


5. Version 4.01 Public Review - 05 July 2017 to 03 August 2017 - Issues

5.1 ODATA-1091 - Special values of numeric types (public comment c201707e0002)

Ralf: Proposal:

1) Restrict the 'special' numeric values to types Single, Double, and Decimal
2) keep 4.0 behavior for div operator - fail for division by zero
3) restrict fail-safe division by zero (resulting in -INF, INF, or null) to new divby operator

Ralf: DB2 DECFLOAT DIV is in sync with our proposal

1) Restrict the 'special' numeric values to types Single, Double, and Decimal(Scale=floating)
2) keep 4.0 behavior for div operator - fail for division by zero for dividends other than Single, Double, and Decimal(Scale=floating)


3) restrict fail-safe division by zero (resulting in -INF, INF, or null) to new divby operator

Ralf: Defer motion until we have quorum

5.2 ODATA-1092 - Navigation Property Binding (public comment c201707e0004)

Ralf: Description:

Public Review Comment https://lists.oasis-open.org/archives/odata-comment/201707/msg00004.html

This comment concerns navigation property bindings. There are two parts, a general issue with 4.0 and a similar issue that has been introduced with 4.01. The comment refers to:

OData Common Schema Definition Language (CSDL) XML Representation Version 4.01
Committee Specification Draft 02 / Public Review Draft 02

8.4 says:

> Containment navigation properties define an implicit entity set for each instance of its declaring structured
> type

13.4 says:

> If the entity type of an entity set or singleton declares navigation properties, a navigation property binding
> allows describing which entity set or singleton will contain the related entities

It therefore makes sense that a Binding Target must identify a single entity set.

My issue is that this path is allowed to be a path to any "containment navigation property in scope". Such a path only identifies an entity set uniquely in cases where the path includes a singleton. If the path includes an EntitySet then, as per 8.4, it will be pointing to a set of EntitySets, one per entity instance.

15.4 contains an example that highlights the problem:

> MySchema.MyEntityContainer/MyEntitySet/MyContainmentNavigationProperty

This issue applies to both version 4.0 and 4.01. The resulting navigation property is only weakly bound. Anyone attempting to validate a link must exhaustively search every instance of MyEntitySet to determine the validity of the link. You also have the strange situation that a bound navigation property may link to two different entities WITH THE SAME KEY. (There is no requirement that keys are unique across entity sets.) This contravenes one of the methods of addressing entities in URLs:

OData Version 4.01. Part 2: URL Conventions 4.9

> For [ ... ] collection-valued navigation properties with a NavigationPropertyBinding or ContainsTarget=true specification, members of the collection can be addressed by convention by appending the parenthesized key to the URL specifying the collection of entities

So the above is already a problem IMO and I propose that the target paths be restricted to traversing Singletons (that is, if an entity set is specified it must be the last component of the path).

Coming on to the new issue in 4.01...

Version 4.01 has modified the way navigation bindings work to allow a single navigation property to be bound, simultaneously, to multiple entity sets based on the type of the target. Straight away this triggers the same issue, that bound navigation properties no longer have unique keys.

I'm unhappy with the idea that a binding may now bind to multiple entity sets as it would involve removing the ability to append a key to uniquely identify an entity via a (bound) navigation path. It isn't clear what problem you're trying to solve here but it feels like it is best solved using multiple navigation properties rather than attempting an 'octopus binding'.

Even if you allow a single bound navigation property to bind to multiple entity sets the new feature creates the possibility of a partially bound navigation property. If I have a navigation property called A of type Collection(TypeA) and TypeA has two sub-types, TypeB and TypeC then we can now bind any of the following:


The most specific rule applies so the last two rules override the first two but if we only bind A/TypeC then any instances of TypeB linked to A are unbound. The result is a partially bound navigation property. This could be corrected by requiring a default binding (with no type cast segment) if a type-cast binding is provided.

Hopefully helpful.


Ralf: Proposal:

13.4.2 Binding Target

Clarify that a containment navigation property can only be a target if it directly or indirectly belongs to a singleton - inserted text in square brackets:

If the target is a target path, it MUST resolve to an entity set, singleton, or
[direct or indirect] containment navigation property [of a singleton] in scope."

15.4 Target Path - Example 67

Replace "MyEntitySet" with "MySingleton" in third and fourth example to avoid confusion.

13.4.1 Binding Path and 13.4.2 Binding Target - Example 37

Part 3) of ODATA-674 was not applied - binding path may traverse collection-valued segments, binding applies to all members. Example 37 is supposed to show this. Add missing text for Part 3) of ODATA-674 and refer to it in example 37.

[If the path traverses collection-valued complex properties or collection-valued containment navigation properties, the binding applies to all items of these collections.]

13.4.1 Binding Path with type-cast segment ("octopus binding") and Part 2, 4.9 Addressing a Member within an Entity Collection

A) do not allow "octopus binding" depending on type of target - this avoids incomplete bindings and guarantees addressability via an appended key segment as advertised in Part 2, section 4.9

B) add complicated wording to 13.4.1 and Part 2, section 4.9 to exactly capture under which circumstances a member of a navigation property with "octopus binding" can still be addressed via its key.

(Ralf is in favor of A)

Ralf: Bindings:

- Related/Type.A --> Foo
- Related/Type.B --> Bar
X(42)/Related/Type.A(1) --> Foo(1)
X(42)/Related/Type.B(1) --> Bar(1)
EntitySet X
X(42)/Related(1) --> ???

Mike: Clients can always get the canonical URL for a member of a collection with a navigation property binding by appending the key to the target specified in the navigation property binding for the collection. However, addressing an entity by appending the key to the navigation property is only supported if there is a single target entity set, otherwise we can't guarantee the keys are unique.

Ralf: ODATA-1092 is OPEN

George: If Entities of different subtypes are in the same EntitySet, all such entities shall have unique keys in the EntitySet.

Ralf: Yes. The problem we face is for a case where we deal with a collection that is not an entity set

Mike: two problems:
- addressing by key in presence of bindings with type-cast
- completeness of bindings with type-casts

Ralf: Need to cover all branches of the inheritance tree

Ralf: Could be done by requiring a binding for the declared type of the navigation property as a fallback if no more specific binding exists

Ralf: Addressing problem:
- Binding without type-cast: append key
- binding with type-cast: append type-cast and key
- all cases: take target, append key


Issue 1: Today, the presence of a navigationpropertybinding means that all members of a navigation property exist in the same entity set. Because they existing in the same entity set, their keys must be unique, so appending the key to the navigation property must uniquely identify the member of the navigation property.

As above, this is what is broken when we introduce multiple navigation property bindings; you are no longer assured that the keys uniquely identify an entity within the collection (just as, in 4.0, you couldn't be sure the keys uniquely identified the entity within the collection if there was no navigation property binding present).

Clients can always get the canonical URL for a member of a collection with a navigation property binding by appending the key to the target specified in the navigation property binding for the collection.

Addressing an entity by appending the key directly to the navigation property is only supported if there is a single target entity set, otherwise we can't guarantee the keys are unique. In 4.01, there is a single target entity set if there is a single navigation property that does not specify a type cast segment. If the is a navigation property binding that includes the type in the path, then you can address instances of that type by appending the type, followed by the key, to the navigation property.

If the client is willing to look at the navigation property binding, they can use the target to address the entity. The whole point of appending the key to the navigation property is that you don't need to look up the target, you can address the entity by convention of appending the key to the navigation property.

Issue 2:
We should recommend that services provide navigation property bindings for all instances, either by specifying bindings for all derived types or by specifying a binding that does not include the type, as appropriate. However, we can't enforce this, so we need to cover the case where a member of the collection doesn't match any of the bound paths (i.e., there is no binding for its type and no binding that doesn't specify a type). This is treated the same as today if there was no navigation property binding for that instance.

Ralf: https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.xml#L268

Mike: For #1, we *could* introduce a new annotation to directly state that the convention of adding a key to the navigation property applies (i.e., that all members of the collection are uniquely identified by key). This is actually already there in capabilities using the indexable by key annotation.


<Term Name="IndexableByKey" Type="Core.Tag" DefaultValue="true" AppliesTo="EntitySet Collection">
  <Annotation Term="Core.Description" String="Supports key values according to OData URL conventions" />

Mike: Proposal for last part:

We retain "octopus binding" with the semantics that:
1) If there is a single nav prop binding with no type, you can reference members by appending the key to the nav prop.
2) If there is a nav prop binding with a type, you must include the type when appending the key segment to the nav prop.
3) If you want to know if you can append the key to the nav prop, you should really be looking at IndexableByKey annotation in the capabilities vocabulary.
4) If no binding matches an instance, it is unbound (same semantics as no navigation property binding today).

Hubert: I move to resolve ODATA-1092 as proposed. Mike seconds.

Ralf: ODATA-1092 is RESOLVED as proposed

6. Next meetings only bi-weekly during Summer vacation period?

Mike: meet next week, decide then which meetings to have during July and August

6.1 Next Meeting on Thursday July 20, 2017 during 8-10 am PDT (17:00-19:00 CEST)

Confirmed as next meeting

6.2 Meetings following the next one

Ralf: Meeting schedule works for Hubert

Ralf: Mike won't be able to attend all, but he can't loose voting rights

8. AOB and wrap up


Meeting adjourned by chair.