[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Commented: (ODATA-320) Should use /@<annotation-name> to reference applied annotations
[ http://tools.oasis-open.org/issues/browse/ODATA-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32888#action_32888 ]
Ralf Handl commented on ODATA-320:
----------------------------------
I'm wondering whether we need both /@ and just @. Suppose we have a Supplier navigation property leading to a Model.Supplier entity type, and I'm interested in the Display.Caption annotation, which could be attached to the navigation property or the target entity type.
Would Supplier/@Display.Caption be the annotation on the Supplier navigation property, or on the target type? In either case, how would I address the other one?
So we could go for
- Supplier@Display.Caption meaning tne navigation property and
- Supplier/@Display.Caption meaning the annotation at the type, or
we could go for
- Supplier/@Display.Caption meaning the navigation property and
- Supplier/Model.Supplier/@Display.Caption meaning the annotation at the type, using a type-cast segment to disambiguate
The latter has the drawback that we must know/name the concrete target type, and we need to define how this works in combination with inheritance on the target type.
> Should use /@<annotation-name> to reference applied annotations
> ---------------------------------------------------------------
>
> Key: ODATA-320
> URL: http://tools.oasis-open.org/issues/browse/ODATA-320
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Bug
> Components: OData CSDL
> Affects Versions: V4.0_WD01
> Environment: [Proposed]
> Reporter: Michael Pizzo
>
> We recently added the ability to reference the annotation applied to model element by specifying the element followed by "@" and the fully qualified name of the annotation.
> As described in reviewing the application of the change, we chose "@" in applying the change primarily because it allowed the client to more easily differentiate whether the applied cast was to a type or an annotation term.
> However, by using "@" instead of "/", as originally proposed, we lost the ability to identify the different segments of the expression by splitting on "/". Referencing the applied annotation really is properly a different segment and should be separated by "@".
> SO the proposal is to restore the "/" to rightly indicate a separate path segment, but to keep the "@" as a prefix to the annotation in order to more easily differentiate it as an annotation term.
--
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]