You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Prathamesh Joshi." <pr...@vrhythmstech.com> on 2017/01/20 09:41:03 UTC
How to include Property level Annotation Attribute in Version 4.3 ?
Hello All,
I had deployed few services using Olingo V2 (Odata 2 ) now
we are migrating those to Olingo V4.3 (Odata 4).
Confusion I am having is the way new version (4.3)
implemented annotation attributes to <property> element in $metadata
call.
I need to include few custom annotation attributes to <property>
element, I am able to add somehow but wondering is that a right way to do
it.
Lets consider following two snippets
Version 2 :
<EntityTypeName="MyEntity">
<Key>
<PropertyRefName="id"/> </Key>
<PropertyName="id"Type="Edm.Int32"Nullable="false"myAtt1="Id"myAtt2="false"/>
<PropertyName="name"Type="Edm.String"myAtt1="Name"myAtt2="true"/>
</EntityType>
Version 4.3
<EntityTypeName="MyEntity">
<Key> <PropertyRefName="Id"/>
</Key>
<PropertyName="Id"Type="Edm.Int32">
<AnnotationQualifier="myAtt1">
<String>Id</String>
</Annotation>
<AnnotationQualifier="myAtt2">
<String>false</String>
</Annotation>
</Property>
<PropertyName="name"Type="Edm.String">
<AnnotationQualifier="myAtt1">
<String>Name</String>
</Annotation>
<AnnotationQualifier="myAtt2">
<String>true</String>
</Annotation>
</Property>
</EntityType>
As we can see in version 2 the myAttr1 &
myAttr2 were added in <proerty>
element itself where as in version 4.3 they render under
<proerty><annotaion>. Is that correct or is
there any way to include them in <property> tag itself in version
4.3 ?
Thanks in advance.
Re: How to include Property level Annotation Attribute in Version
4.3 ?
Posted by "Prathamesh Joshi." <pr...@vrhythmstech.com>.
Thanks a lot Ramesh.....!
--
Regards,
Prathamesh Joshi.
+91 9960 414 777
________________________________________________
From:"Ramesh Reddy" <ra...@redhat.com>
Sent:user@olingo.apache.org
Date:Mon, January 23, 2017 7:55 pm
Subject:Re: How to include Property level Annotation Attribute in Version
4.3 ?
A Propery has "name" and "type" and defined facets
as described here [1]. Using Annotations as you showed in the first
email is the correct way in OData V4 to add custom attributes to the
Property.
[1] http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752525
Ramesh..
http://teiid.org
Thanks for a answer Ramesh, so as per new specification does in
not allowed to include custom attributes apart from standard ones
specified by ODataV4 in element
?
________________________________________________
From:"Ramesh Reddy"
Sent:user@olingo.apache.org
Date:Fri, January 20, 2017 8:05 pm
Subject:Re: How to include Property level Annotation Attribute in
Version 4.3 ?
The implementation is based on OData specification see http://www.odata.org/documentation/
If you are looking at it as just migration from V2 to V4, IMO you
are going to find lot more issues. You approach as if V4 is brand
new implementation, I am not saying that all what you may have done
for V2 may be lost, but some of it will be.
Ramesh..
Hello All,
I had deployed few services using Olingo V2 (Odata 2 ) now we are
migrating those to Olingo V4.3 (Odata 4).
Confusion I am having is the way new version (4.3)
implemented annotation attributes to element in $metadata
call.
I need to include few custom annotation attributes to element, I am
able to add somehow but wondering is that a right way to do it.
Lets consider following two snippets
Version 2 :
Name="MyEntity">
Name="id"/>
Name="id" Type="Edm.Int32" Nullable="false" myAtt1="Id" myAtt2="false"/>
Name="name" Type="Edm.String" myAtt1="Name" myAtt2="true"/>
Version 4.3
Name="MyEntity">
Name="Id"/>
Name="Id" Type="Edm.Int32">
Qualifier="myAtt1">
Id
Qualifier="myAtt2">
false
Name="name" Type="Edm.String">
Qualifier="myAtt1">
Name
Qualifier="myAtt2">
true
As we can see in version 2 the
myAttr1 & myAttr2 were added
in element itself where as in version 4.3 they render under
. Is that correct or is there any way to include them in tag itself
in version 4.3 ?
Thanks in advance.
--
Thank you.
Prathamesh Joshi.
+91 9960 414 777
Re: How to include Property level Annotation Attribute in Version
4.3 ?
Posted by Ramesh Reddy <ra...@redhat.com>.
A Propery has "name" and "type" and defined facets as described here [1]. Using Annotations as you showed in the first email is the correct way in OData V4 to add custom attributes to the Property.
[1] http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part3-csdl/odata-v4.0-errata03-os-part3-csdl-complete.html#_Toc453752525
Ramesh..
http://teiid.org
----- Original Message -----
> Thanks for a answer Ramesh, so as per new specification does in not allowed
> to include custom attributes apart from standard ones specified by ODataV4
> in <property> element ?
> ________________________________________________
> From:"Ramesh Reddy" <ra...@redhat.com>
> Sent:user@olingo.apache.org
> Date:Fri, January 20, 2017 8:05 pm
> Subject:Re: How to include Property level Annotation Attribute in Version 4.3
> ?
> The implementation is based on OData specification see
> http://www.odata.org/documentation/
> If you are looking at it as just migration from V2 to V4, IMO you are going
> to find lot more issues. You approach as if V4 is brand new implementation,
> I am not saying that all what you may have done for V2 may be lost, but some
> of it will be.
> Ramesh..
> ----- Original Message -----
> > Hello All,
>
> > I had deployed few services using Olingo V2 (Odata 2 ) now we are migrating
> > those to Olingo V4.3 (Odata 4).
>
> > Confusion I am having is the way new version (4.3) implemented annotation
> > attributes to element in $metadata call.
>
> > I need to include few custom annotation attributes to element, I am able to
> > add somehow but wondering is that a right way to do it.
>
> > Lets consider following two snippets
>
> > Version 2 :
>
> > Name =" MyEntity " >
>
> > Name =" id " />
>
> > Name =" id " Type =" Edm.Int32 " Nullable =" false " myAtt1 =" Id " myAtt2
> > ="
> > false " />
>
> > Name =" name " Type =" Edm.String " myAtt1 ="Name" myAtt2 =" true " />
>
> > Version 4.3
>
> > Name ="MyEntity" >
>
> > Name =" Id " />
>
> > Name ="Id" Type =" Edm.Int32 " >
>
> > Qualifier ="myAtt1" >
>
> > Id
>
> > Qualifier ="myAtt2" >
>
> > false
>
> > Name ="name" Type ="Edm.String" >
>
> > Qualifier ="myAtt1" >
>
> > Name
>
> > Qualifier ="myAtt2" >
>
> > true
>
> > As we can see in version 2 the myAttr1 & myAttr2 were added in element
> > itself
> > where as in version 4.3 they render under
>
> > . Is that correct or is there any way to include them in tag itself in
> > version 4.3 ?
>
> > Thanks in advance.
>
> --
> Thank you.
> Prathamesh Joshi.
> +91 9960 414 777
Re: How to include Property level Annotation Attribute in Version
4.3 ?
Posted by "Prathamesh Joshi." <pr...@vrhythmstech.com>.
Thanks for a answer Ramesh, so as per new specification does in
not allowed to include custom attributes apart from standard ones
specified by ODataV4 in <property> element
?
________________________________________________
From:"Ramesh Reddy" <ra...@redhat.com>
Sent:user@olingo.apache.org
Date:Fri, January 20, 2017 8:05 pm
Subject:Re: How to include Property level Annotation Attribute in Version
4.3 ?
The implementation is based on OData specification see http://www.odata.org/documentation/
If you are looking at it as just migration from V2 to V4, IMO you are
going to find lot more issues. You approach as if V4 is brand new
implementation, I am not saying that all what you may have done for V2
may be lost, but some of it will be.
Ramesh..
Hello All,
I had deployed few services using Olingo V2 (Odata 2 ) now we are
migrating those to Olingo V4.3 (Odata 4).
Confusion I am having is the way new version (4.3) implemented
annotation attributes to element in $metadata
call.
I need to include few custom annotation attributes to
element, I am able to add somehow but wondering is that a right way to
do it.
Lets consider following two snippets
Version 2 :
Name="MyEntity">
Name="id"/>
Name="id" Type="Edm.Int32" Nullable="false" myAtt1="Id" myAtt2="false"/>
Name="name" Type="Edm.String" myAtt1="Name" myAtt2="true"/>
Version 4.3
Name="MyEntity">
Name="Id"/>
Name="Id" Type="Edm.Int32">
Qualifier="myAtt1">
Id
Qualifier="myAtt2">
false
Name="name" Type="Edm.String">
Qualifier="myAtt1">
Name
Qualifier="myAtt2">
true
As we can see in version 2 the
myAttr1 & myAttr2 were added in
element itself where as in
version 4.3 they render under
. Is that
correct or is there any way to include them in tag itself
in version 4.3 ?
Thanks in advance.
--
Thank you.
Prathamesh Joshi.
+91 9960 414 777
Re: How to include Property level Annotation Attribute in Version
4.3 ?
Posted by Ramesh Reddy <ra...@redhat.com>.
The implementation is based on OData specification see http://www.odata.org/documentation/
If you are looking at it as just migration from V2 to V4, IMO you are going to find lot more issues. You approach as if V4 is brand new implementation, I am not saying that all what you may have done for V2 may be lost, but some of it will be.
Ramesh..
----- Original Message -----
> Hello All,
> I had deployed few services using Olingo V2 (Odata 2 ) now we are migrating
> those to Olingo V4.3 (Odata 4).
> Confusion I am having is the way new version (4.3) implemented annotation
> attributes to <property> element in $metadata call.
> I need to include few custom annotation attributes to <property> element, I
> am able to add somehow but wondering is that a right way to do it.
> Lets consider following two snippets
> Version 2 :
> <EntityType Name =" MyEntity " >
> <Key> <PropertyRef Name =" id " /> </Key>
> <Property Name =" id " Type =" Edm.Int32 " Nullable =" false " myAtt1 =" Id "
> myAtt2 =" false " />
> <Property Name =" name " Type =" Edm.String " myAtt1 ="Name" myAtt2 =" true "
> />
> </EntityType>
> Version 4.3
> <EntityType Name ="MyEntity" >
> <Key> <PropertyRef Name =" Id " /> </Key>
> <Property Name ="Id" Type =" Edm.Int32 " >
> <Annotation Qualifier ="myAtt1" >
> <String> Id </String>
> </Annotation>
> <Annotation Qualifier ="myAtt2" >
> <String> false </String>
> </Annotation>
> </Property>
> <Property Name ="name" Type ="Edm.String" >
> <Annotation Qualifier ="myAtt1" >
> <String> Name</String>
> </Annotation>
> <Annotation Qualifier ="myAtt2" >
> <String> true </String>
> </Annotation>
> </Property>
> </EntityType>
> As we can see in version 2 the myAttr1 & myAttr2 were added in <proerty>
> element itself where as in version 4.3 they render under
> <proerty><annotaion> . Is that correct or is there any way to include them in
> <property> tag itself in version 4.3 ?
> Thanks in advance.