[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Commented: (ODATA-364) Remove restriction that a property MUST NOT have the same name as its containing type
[ http://tools.oasis-open.org/issues/browse/ODATA-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33335#action_33335 ]
Ralf Handl commented on ODATA-364:
----------------------------------
I assumed that the restriction would "cascade down" to derived types, but I now see that I can interpret the prose text in a way that allows my example.
Nicely enough C# also reads it that way: I can have a member Manager in class Employee, and a member Employee in class Manager, Manager deriving from Employee.
I can also build a fully working service with the WCF Reflection Provider where Manager has a member Employee.
And I can build a service where Employee has a member Manager, and the only thing that fails in this service is the call to $metadata, because this part of WCF Data Services is pickier than C# :-)
So for now I would be satisfied if we explicitly state that this restriction only applies to directly declared properties and does not apply to inherited properties. Which has benefit because the "non-breaking" change of adding a property to the base entity type cannot break the derived entity type
> Remove restriction that a property MUST NOT have the same name as its containing type
> -------------------------------------------------------------------------------------
>
> Key: ODATA-364
> URL: http://tools.oasis-open.org/issues/browse/ODATA-364
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Improvement
> Components: OData CSDL
> Affects Versions: V4.0_CSD01
> Environment: [Proposed]
> Reporter: Ralf Handl
> Fix For: V4.0_CSD02
>
>
> Chapters 8 and 9 state that
> - Properties MUST NOT have the same name as the declaring entity type.
> - Properties MUST NOT have the same name as the declaring complex type.
> This sometimes prevents using natural names for properties, e.g.
> - EntityType Employee
> - EntityType Manager inherits from Employee
> - EntityType Employee has NavigationProperty that leads to the manager
> The natural name for the navigation property is Manager, but prevented by the above rule. So the navigation property has to be named "TheManager" or "manager" (using different case)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]