You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Vijay Kumar Rani <rv...@gmail.com> on 2014/12/01 12:34:37 UTC
Re: Navigation Property in Olingo4
Hi,
I am able to generate the Metadata for Navigation , which API should I use
to set the Navigation Properties?
Entity have addProperrty, setLink , selfLink Methods and how to set
Navigation properties of corresponding entity?
Regards,
Vijay.
On Fri, Nov 28, 2014 at 8:11 PM, Vijay Kumar Rani <rv...@gmail.com> wrote:
> Thanks for correction the link is as you mentioned , I am getting the
> exception as I mentioned in my earlier mail.
> On 28-Nov-2014 7:48 pm, "Alex Maiereanu" <al...@3sstudio.com>
> wrote:
>
>> shouldn't your link look like this
>>
>> odata.svc/ETTwoPrim(32766)/NavPropertyETAllPrimOne ?
>>
>> You have a typo in odata.svc/ESTwoPrim(32766)/NavPropertyETAllPrimOne
>>
>> Except that, maybe the odata service is not configured right?
>>
>>
>> Salutari din Brasov / Greetings from Brasov
>>
>> Alex-Paul Maiereanu
>>
>> +40 761 684 212
>>
>> www.3sstudio.com
>>
>> Facebook <https://www.facebook.com/smartsocialsoftware> Twitter
>> <https://twitter.com/SmartSocialSoft> Google+
>> <https://plus.google.com/101299629750815349588/posts>
>>
>> On Fri, Nov 28, 2014 at 7:12 AM, Vijay Kumar Rani <rv...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Here is the my metadata from example
>>> <EntityType Name="ETTwoPrim">
>>> <Key>
>>> <PropertyRef Name="PropertyInt16"/>
>>> </Key>
>>> <Property Name="PropertyInt16" Type="Edm.Int16" Nullable="false"/>
>>> <Property Name="PropertyString" Type="Edm.String"/>
>>> <NavigationProperty Name="NavPropertyETAllPrimOne" Type="
>>> olingo.odata.test1.ETAllPrim"/>
>>> <NavigationProperty Name="NavPropertyETAllPrimMany" Type="
>>> Collection(olingo.odata.test1.ETAllPrim)"/>
>>> </EntityType>
>>>
>>> when I access as
>>>
>>> odata.svc/ESTwoPrim(32766)/NavPropertyETAllPrimOne
>>>
>>>
>>>
>>> {"error": {"code": null,"message": "Invalid resource type."}}
>>>
>>>
>>> where I should set navigation properties to entity?
>>>
>>> Vijay
>>>
>>> On Thu, Nov 27, 2014 at 10:16 PM, Vijay Kumar Rani <rv...@gmail.com>
>>> wrote:
>>>
>>>> Which class should I use to set navigation property of an entity
>>>>
>>>> On Thu, Nov 27, 2014 at 8:26 PM, Alex Maiereanu <
>>>> alex.maiereanu@3sstudio.com> wrote:
>>>>
>>>>> I'm not the expert on the framework here, so I may be wrong, but I
>>>>> think that you should use ODataEntity since it has all the
>>>>> functionality that you need. You can then also follow the unit tests.
>>>>>
>>>>> Salutari din Brasov / Greetings from Brasov
>>>>>
>>>>> Alex-Paul Maiereanu
>>>>>
>>>>> +40 761 684 212
>>>>>
>>>>> www.3sstudio.com
>>>>>
>>>>> Facebook <https://www.facebook.com/smartsocialsoftware> Twitter
>>>>> <https://twitter.com/SmartSocialSoft> Google+
>>>>> <https://plus.google.com/101299629750815349588/posts>
>>>>>
>>>>> On Thu, Nov 27, 2014 at 11:24 AM, Vijay Kumar Rani <rv...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I am looking for how to set navigation property for Entity of type
>>>>>> (org.apache.olingo.commons.api.data.Entity)
>>>>>>
>>>>>> Vijay
>>>>>>
>>>>>> On Thu, Nov 27, 2014 at 6:40 PM, Alex Maiereanu <
>>>>>> alex.maiereanu@3sstudio.com> wrote:
>>>>>>
>>>>>>> Hi Vijay,
>>>>>>>
>>>>>>> Check out the following link:
>>>>>>>
>>>>>>>
>>>>>>> https://github.com/apache/olingo-odata4/blob/master/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
>>>>>>> , line 275
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Salutari din Brasov / Greetings from Brasov
>>>>>>>
>>>>>>> Alex-Paul Maiereanu
>>>>>>>
>>>>>>> +40 761 684 212
>>>>>>>
>>>>>>> www.3sstudio.com
>>>>>>>
>>>>>>> Facebook <https://www.facebook.com/smartsocialsoftware> Twitter
>>>>>>> <https://twitter.com/SmartSocialSoft> Google+
>>>>>>> <https://plus.google.com/101299629750815349588/posts>
>>>>>>>
>>>>>>> On Thu, Nov 27, 2014 at 9:31 AM, Vijay Kumar Rani <rvkumar@gmail.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Is Entity.setLink will work for navigation property?
>>>>>>>> On 27-Nov-2014 3:16 pm, "Amend, Christian" <ch...@sap.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> no our technical scenario does not support navigation for now but
>>>>>>>>> the library does give you everything you need to implement navigation. We
>>>>>>>>> just didn`t have the time to integrate it into our sample scenario.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best Regards,
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *From:* Vijay Kumar Rani [mailto:rvkumar@gmail.com]
>>>>>>>>> *Sent:* Donnerstag, 27. November 2014 10:29
>>>>>>>>> *To:* user@olingo.apache.org
>>>>>>>>> *Subject:* Navigation Property in Olingo4
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am using Olingo4 latest code in GIT, is it currently supporting
>>>>>>>>> accessing Navigation Properties.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I am accessing the request as below.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> odata.svc/ESAllPrim(32767)/NavPropertyETTwoPrimOne?
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
Re: Navigation Property in Olingo4
Posted by Ramesh Reddy <ra...@redhat.com>.
Vijay,
I suggest you consult OData specification for questions like this, see http://www.odata.org/documentation/odata-version-4-0/
I have not looked through, but this seems to be appropriate section http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426815
Ramesh..
----- Original Message -----
> Hi,
> I am able to generate the Metadata for Navigation , which API should I use to
> set the Navigation Properties?
> Entity have addProperrty, setLink , selfLink Methods and how to set
> Navigation properties of corresponding entity?
> Regards,
> Vijay.
> On Fri, Nov 28, 2014 at 8:11 PM, Vijay Kumar Rani < rvkumar@gmail.com >
> wrote:
> > Thanks for correction the link is as you mentioned , I am getting the
> > exception as I mentioned in my earlier mail.
>
> > On 28-Nov-2014 7:48 pm, "Alex Maiereanu" < alex.maiereanu@3sstudio.com >
> > wrote:
>
> > > shouldn't your link look like this
> >
>
> > > odata.svc/ ETTwoPrim (32766)/ NavPropertyETAllPrimOne ?
> >
>
> > > You have a typo in odata.svc/ESTwoPrim(32766)/ NavPropertyETAllPrimOne
> >
>
> > > Except that, maybe the odata service is not configured right?
> >
>
> > > Salutari din Brasov / Greetings from Brasov
> >
>
> > > Alex-Paul Maiereanu
> >
>
> > > +40 761 684 212
> >
>
> > > www.3sstudio.com
> >
>
> > > Facebook Twitter Google+
> >
>
> > > On Fri, Nov 28, 2014 at 7:12 AM, Vijay Kumar Rani < rvkumar@gmail.com >
> > > wrote:
> >
>
> > > > Hi,
> > >
> >
>
> > > > Here is the my metadata from example
> > >
> >
>
> > > > <EntityType Name =" ETTwoPrim " >
> > >
> >
>
> > > > <Key>
> > >
> >
>
> > > > <PropertyRef Name =" PropertyInt16 " />
> > >
> >
>
> > > > </Key>
> > >
> >
>
> > > > <Property Name =" PropertyInt16 " Type =" Edm.Int16 " Nullable =" false
> > > > "
> > > > />
> > >
> >
>
> > > > <Property Name =" PropertyString " Type =" Edm.String " />
> > >
> >
>
> > > > <NavigationProperty Name =" NavPropertyETAllPrimOne " Type ="
> > > > olingo.odata.test1.ETAllPrim " />
> > >
> >
>
> > > > <NavigationProperty Name =" NavPropertyETAllPrimMany " Type ="
> > > > Collection(olingo.odata.test1.ETAllPrim) " />
> > >
> >
>
> > > > </EntityType>
> > >
> >
>
> > > > when I access as
> > >
> >
>
> > > > odata.svc/ESTwoPrim(32766)/NavPropertyETAllPrimOne
> > >
> >
>
> > > > { " error ": { " code ": null , " message ": " Invalid resource type. "
> > > > }
> > > > }
> > >
> >
>
> > > > where I should set navigation properties to entity?
> > >
> >
>
> > > > Vijay
> > >
> >
>
> > > > On Thu, Nov 27, 2014 at 10:16 PM, Vijay Kumar Rani < rvkumar@gmail.com
> > > > >
> > > > wrote:
> > >
> >
>
> > > > > Which class should I use to set navigation property of an entity
> > > >
> > >
> >
>
> > > > > On Thu, Nov 27, 2014 at 8:26 PM, Alex Maiereanu <
> > > > > alex.maiereanu@3sstudio.com
> > > > > > wrote:
> > > >
> > >
> >
>
> > > > > > I'm not the expert on the framework here, so I may be wrong, but I
> > > > > > think
> > > > > > that
> > > > > > you should use ODataEntity since it has all the functionality that
> > > > > > you
> > > > > > need.
> > > > > > You can then also follow the unit tests.
> > > > >
> > > >
> > >
> >
>
> > > > > > Salutari din Brasov / Greetings from Brasov
> > > > >
> > > >
> > >
> >
>
> > > > > > Alex-Paul Maiereanu
> > > > >
> > > >
> > >
> >
>
> > > > > > +40 761 684 212
> > > > >
> > > >
> > >
> >
>
> > > > > > www.3sstudio.com
> > > > >
> > > >
> > >
> >
>
> > > > > > Facebook Twitter Google+
> > > > >
> > > >
> > >
> >
>
> > > > > > On Thu, Nov 27, 2014 at 11:24 AM, Vijay Kumar Rani <
> > > > > > rvkumar@gmail.com
> > > > > > >
> > > > > > wrote:
> > > > >
> > > >
> > >
> >
>
> > > > > > > I am looking for how to set navigation property for Entity of
> > > > > > > type
> > > > > > > (org.apache.olingo.commons.api.data.Entity)
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > Vijay
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > On Thu, Nov 27, 2014 at 6:40 PM, Alex Maiereanu <
> > > > > > > alex.maiereanu@3sstudio.com
> > > > > > > > wrote:
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > Hi Vijay,
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > Check out the following link:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > https://github.com/apache/olingo-odata4/blob/master/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
> > > > > > > > , line 275
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > Salutari din Brasov / Greetings from Brasov
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > Alex-Paul Maiereanu
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > +40 761 684 212
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > www.3sstudio.com
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > Facebook Twitter Google+
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > On Thu, Nov 27, 2014 at 9:31 AM, Vijay Kumar Rani <
> > > > > > > > rvkumar@gmail.com
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > Is Entity.setLink will work for navigation property?
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > On 27-Nov-2014 3:16 pm, "Amend, Christian" <
> > > > > > > > > christian.amend@sap.com
> > > > > > > > > >
> > > > > > > > > wrote:
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > no our technical scenario does not support navigation for
> > > > > > > > > > now
> > > > > > > > > > but
> > > > > > > > > > the
> > > > > > > > > > library
> > > > > > > > > > does give you everything you need to implement navigation.
> > > > > > > > > > We
> > > > > > > > > > just
> > > > > > > > > > didn`t
> > > > > > > > > > have the time to integrate it into our sample scenario.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Best Regards,
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Christian
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > From: Vijay Kumar Rani [mailto: rvkumar@gmail.com ]
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Sent: Donnerstag, 27. November 2014 10:29
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > To: user@olingo.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Subject: Navigation Property in Olingo4
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > I am using Olingo4 latest code in GIT, is it currently
> > > > > > > > > > supporting
> > > > > > > > > > accessing
> > > > > > > > > > Navigation Properties.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > I am accessing the request as below.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
> > > > > > > > > > odata.svc/ESAllPrim(32767)/NavPropertyETTwoPrimOne?
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>