You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Anil G <gv...@gmail.com> on 2015/07/21 01:07:59 UTC

[Olingo for V4] PUT & DELETE on $ref Collection

Hi,

I see that I cannot implement DELETE & PUT operations $ref Collections. Is
this by design? or a missing feature in beta3?

I want to DELETE a specific relationship between a source and one of the
target entities in a 1-* relationship. I don't see a way to do it?

Any help is greatly appreciated.

Thanks
Anil

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Anil G <gv...@gmail.com>.
Hi Christian,

I am using the beta3 & here's the ODataHandler code. As you can see the
DELETE is handled only if the Navigation multiplicity is 1-1 but isn't not
supported for 1-Many



*private* *void* handleReferenceDispatching(*final* ODataRequest request,
*final* ODataResponse response,

      *final* *int* lastPathSegmentIndex)

      *throws* ODataHandlerException, ContentNegotiatorException,
ODataApplicationException,

      SerializerException, DeserializerException {

    *final* HttpMethod method = request.getMethod();

    *if* (((UriResourcePartTyped) uriInfo.getUriResourceParts().get(
lastPathSegmentIndex - 1)).isCollection()) {

      *if* (method == HttpMethod.*GET*) {

        *final* ContentType responseFormat = ContentNegotiator.
*doContentNegotiation*(uriInfo.getFormatOption(),

            request, customContentTypeSupport, RepresentationType.
*COLLECTION_REFERENCE*);

        selectProcessor(ReferenceCollectionProcessor.*class*)

            .readReferenceCollection(request, response, uriInfo,
responseFormat);

      } *else* *if* (method == HttpMethod.*POST*) {

        *final* ContentType requestFormat = ContentType.*parse*(request
.getHeader(HttpHeader.*CONTENT_TYPE*));

        checkContentTypeSupport(requestFormat, RepresentationType.
*REFERENCE*);

        selectProcessor(ReferenceProcessor.*class*)

            .createReference(request, response, uriInfo, requestFormat);

      } *else* {

        *throw* *new* ODataHandlerException("HTTP method " + method + " is
not allowed.",

            ODataHandlerException.MessageKeys.*HTTP_METHOD_NOT_ALLOWED*,
method.toString());

      }

    } *else* {

      *if* (method == HttpMethod.*GET*) {

        *final* ContentType responseFormat = ContentNegotiator.
*doContentNegotiation*(uriInfo.getFormatOption(),

            request, customContentTypeSupport, RepresentationType.
*REFERENCE*);

        selectProcessor(ReferenceProcessor.*class*).readReference(request,
response, uriInfo, responseFormat);

      } *else* *if* (method == HttpMethod.*PUT* || method == HttpMethod.
*PATCH*) {

        *final* ContentType requestFormat = ContentType.*parse*(request
.getHeader(HttpHeader.*CONTENT_TYPE*));

        checkContentTypeSupport(requestFormat, RepresentationType.
*REFERENCE*);

        selectProcessor(ReferenceProcessor.*class*)

            .updateReference(request, response, uriInfo, requestFormat);

      } *else* *if* (method == HttpMethod.*DELETE*) {

        selectProcessor(ReferenceProcessor.*class*)

            .deleteReference(request, response, uriInfo);

      } *else* {

        *throw* *new* ODataHandlerException("HTTP method " + method + " is
not allowed.",

            ODataHandlerException.MessageKeys.*HTTP_METHOD_NOT_ALLOWED*,
method.toString());

      }

    }

  }

On Thu, Jul 23, 2015 at 7:42 AM, Amend, Christian <ch...@sap.com>
wrote:

>  Hi,
>
>
>
> I don`t have the corresponding JIRA issue at hand but the current
> 4.0.0-SNAPSHOT does support delete on References. Since you can only delete
> one reference at a time we dispatch this to the
> ReferenceProcessor.deleteReference(…) method.
>
>
>
> This is the code we use in our technical processor which is used for our
> integration tests:
>
>
>
>     *final* UriResourceNavigation lastNavigation = getLastNavigation(
> uriInfo);
>
>     *final* IdOption idOption = uriInfo.getIdOption();
>
>
>
>     ensureNavigationPropertyNotNull(lastNavigation);
>
>     *if* (lastNavigation.isCollection() && idOption == *null*) {
>
>       *throw* *new* ODataApplicationException("Id system query option
> must be provided",
>
>           HttpStatusCode.*BAD_REQUEST*.getStatusCode(),
>
>           Locale.*ROOT*);
>
>     } *else* *if* (!lastNavigation.isCollection() && idOption != *null*) {
>
>       *throw* *new* ODataApplicationException("Id system query option
> must not be provided",
>
>           HttpStatusCode.*BAD_REQUEST*.getStatusCode(),
>
>           Locale.*ROOT*);
>
>     }
>
>
>
>     *final* Entity entity = readEntity(uriInfo, *true*);
>
>     dataProvider.deleteReference(entity,
>
>         lastNavigation.getProperty(),
>
>         (uriInfo.getIdOption() != *null*) ? uriInfo.getIdOption().getValue()
> : *null*,
>
>         request.getRawBaseUri());
>
>
>
>     response.setStatusCode(HttpStatusCode.*NO_CONTENT*.getStatusCode());
>
>
>
> As Ramesh noted there is a lot of boilerplate code which leaves you a lot
> of freedom but if you need more convenience I recommend you have a look at
> the ServiceHandler.
>
>
>
> Best Regards,
>
> Christian
>
>
>
> *From:* Ramesh Reddy [mailto:rareddy@redhat.com]
> *Sent:* Mittwoch, 22. Juli 2015 01:05
> *To:* user@olingo.apache.org
> *Subject:* Re: [Olingo for V4] PUT & DELETE on $ref Collection
>
>
>
> No, it does not use Processor interfaces, it is a completely independent
> implementation. As I mentioned in earlier threads, it also does lot of
>  boiler plate coding not available in ODataHandler, like building the
> ContextURL, sterilizers, responses etc.
>
>
>
> Ramesh..
>
>
>  ------------------------------
>
>  so it must be using the processors internally right? how does it work if
> the ODataHandler cannot make the right call on the Processors - since it
> isn't implemented?
>
>
>
> Or is the ServiceHandler a different implementation layer independent of
> ODataHandler?
>
>
>
> On Tue, Jul 21, 2015 at 3:34 PM, Ramesh Reddy <ra...@redhat.com> wrote:
>
> See the ServiceHandler support for PUT in references here
> https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L377
>  and
> https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L413
>
>
>
> Ramesh..
>
>
>  ------------------------------
>
>  Hi Ramesh
>
>
>
> thanks. yes I found that it was missing in ODataHandler code in beta3. But
> was wondering if that's what spec would have said. I could see that there
> was a PUT on $ref explained so I knew if was a deficit on beta3. Just
> wanted to confirm.
>
>
>
> Thanks & Regards
>
> Anil
>
>
>
>
>
> On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy <ra...@redhat.com> wrote:
>
> Anil,
>
>
>
> See
> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081
> and
> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332 for
> the OData spec support.
>
>
>
> As per support in "beta-3", I believe I added much of these into
> "ServiceHandler" interface, not sure on Processor interface methods.  You
> can always debug into "ODataHandler" or "ServiceDispatcher" classes to see
> if feature is implemented or not. If you find something not implemented you
> can open JIRA with details.
>
>
>
> Thanks
>
>
>
> Ramesh..
>
>
>  ------------------------------
>
>  hi everyone,
>
>
>
> can somebody help me here as I am stuck on how to address these usecases.
> Is this because it's not allowed in the spec (which I am still not able to
> figure out or just not available in beta3 yet?)
>
>
>
> Thanks
>
> Anil
>
>
>
> On Mon, Jul 20, 2015 at 4:07 PM, Anil G <gv...@gmail.com> wrote:
>
> Hi,
>
>
>
> I see that I cannot implement DELETE & PUT operations $ref Collections. Is
> this by design? or a missing feature in beta3?
>
>
>
> I want to DELETE a specific relationship between a source and one of the
> target entities in a 1-* relationship. I don't see a way to do it?
>
>
>
> Any help is greatly appreciated.
>
>
>
> Thanks
>
> Anil
>
>
>
>
>
>
>
>
>
>
>
>
>

RE: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by "Amend, Christian" <ch...@sap.com>.
Hi,

I don`t have the corresponding JIRA issue at hand but the current 4.0.0-SNAPSHOT does support delete on References. Since you can only delete one reference at a time we dispatch this to the ReferenceProcessor.deleteReference(…) method.

This is the code we use in our technical processor which is used for our integration tests:

    final UriResourceNavigation lastNavigation = getLastNavigation(uriInfo);
    final IdOption idOption = uriInfo.getIdOption();

    ensureNavigationPropertyNotNull(lastNavigation);
    if (lastNavigation.isCollection() && idOption == null) {
      throw new ODataApplicationException("Id system query option must be provided",
          HttpStatusCode.BAD_REQUEST.getStatusCode(),
          Locale.ROOT);
    } else if (!lastNavigation.isCollection() && idOption != null) {
      throw new ODataApplicationException("Id system query option must not be provided",
          HttpStatusCode.BAD_REQUEST.getStatusCode(),
          Locale.ROOT);
    }

    final Entity entity = readEntity(uriInfo, true);
    dataProvider.deleteReference(entity,
        lastNavigation.getProperty(),
        (uriInfo.getIdOption() != null) ? uriInfo.getIdOption().getValue() : null,
        request.getRawBaseUri());

    response.setStatusCode(HttpStatusCode.NO_CONTENT.getStatusCode());

As Ramesh noted there is a lot of boilerplate code which leaves you a lot of freedom but if you need more convenience I recommend you have a look at the ServiceHandler.

Best Regards,
Christian

From: Ramesh Reddy [mailto:rareddy@redhat.com]
Sent: Mittwoch, 22. Juli 2015 01:05
To: user@olingo.apache.org
Subject: Re: [Olingo for V4] PUT & DELETE on $ref Collection

No, it does not use Processor interfaces, it is a completely independent implementation. As I mentioned in earlier threads, it also does lot of  boiler plate coding not available in ODataHandler, like building the ContextURL, sterilizers, responses etc.

Ramesh..

________________________________
so it must be using the processors internally right? how does it work if the ODataHandler cannot make the right call on the Processors - since it isn't implemented?

Or is the ServiceHandler a different implementation layer independent of ODataHandler?

On Tue, Jul 21, 2015 at 3:34 PM, Ramesh Reddy <ra...@redhat.com>> wrote:
See the ServiceHandler support for PUT in references here https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L377 and https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L413

Ramesh..

________________________________
Hi Ramesh

thanks. yes I found that it was missing in ODataHandler code in beta3. But was wondering if that's what spec would have said. I could see that there was a PUT on $ref explained so I knew if was a deficit on beta3. Just wanted to confirm.

Thanks & Regards
Anil


On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy <ra...@redhat.com>> wrote:
Anil,

See http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081  and http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332 for the OData spec support.

As per support in "beta-3", I believe I added much of these into "ServiceHandler" interface, not sure on Processor interface methods.  You can always debug into "ODataHandler" or "ServiceDispatcher" classes to see if feature is implemented or not. If you find something not implemented you can open JIRA with details.

Thanks

Ramesh..

________________________________
hi everyone,

can somebody help me here as I am stuck on how to address these usecases. Is this because it's not allowed in the spec (which I am still not able to figure out or just not available in beta3 yet?)

Thanks
Anil

On Mon, Jul 20, 2015 at 4:07 PM, Anil G <gv...@gmail.com>> wrote:
Hi,

I see that I cannot implement DELETE & PUT operations $ref Collections. Is this by design? or a missing feature in beta3?

I want to DELETE a specific relationship between a source and one of the target entities in a 1-* relationship. I don't see a way to do it?

Any help is greatly appreciated.

Thanks
Anil







Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Ramesh Reddy <ra...@redhat.com>.
No, it does not use Processor interfaces, it is a completely independent implementation. As I mentioned in earlier threads, it also does lot of boiler plate coding not available in ODataHandler, like building the ContextURL, sterilizers, responses etc. 

Ramesh.. 

----- Original Message -----

> so it must be using the processors internally right? how does it work if the
> ODataHandler cannot make the right call on the Processors - since it isn't
> implemented?

> Or is the ServiceHandler a different implementation layer independent of
> ODataHandler?

> On Tue, Jul 21, 2015 at 3:34 PM, Ramesh Reddy < rareddy@redhat.com > wrote:

> > See the ServiceHandler support for PUT in references here
> > https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L377
> > and
> > https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L413
> 

> > Ramesh..
> 

> > > Hi Ramesh
> > 
> 

> > > thanks. yes I found that it was missing in ODataHandler code in beta3.
> > > But
> > > was wondering if that's what spec would have said. I could see that there
> > > was a PUT on $ref explained so I knew if was a deficit on beta3. Just
> > > wanted
> > > to confirm.
> > 
> 

> > > Thanks & Regards
> > 
> 
> > > Anil
> > 
> 

> > > On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy < rareddy@redhat.com >
> > > wrote:
> > 
> 

> > > > Anil,
> > > 
> > 
> 

> > > > See
> > > > http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081
> > > > and
> > > > http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332
> > > > for the OData spec support.
> > > 
> > 
> 

> > > > As per support in "beta-3", I believe I added much of these into
> > > > "ServiceHandler" interface, not sure on Processor interface methods.
> > > > You
> > > > can
> > > > always debug into "ODataHandler" or "ServiceDispatcher" classes to see
> > > > if
> > > > feature is implemented or not. If you find something not implemented
> > > > you
> > > > can
> > > > open JIRA with details.
> > > 
> > 
> 

> > > > Thanks
> > > 
> > 
> 

> > > > Ramesh..
> > > 
> > 
> 

> > > > > hi everyone,
> > > > 
> > > 
> > 
> 

> > > > > can somebody help me here as I am stuck on how to address these
> > > > > usecases.
> > > > > Is
> > > > > this because it's not allowed in the spec (which I am still not able
> > > > > to
> > > > > figure out or just not available in beta3 yet?)
> > > > 
> > > 
> > 
> 

> > > > > Thanks
> > > > 
> > > 
> > 
> 
> > > > > Anil
> > > > 
> > > 
> > 
> 

> > > > > On Mon, Jul 20, 2015 at 4:07 PM, Anil G < gvnanils@gmail.com > wrote:
> > > > 
> > > 
> > 
> 

> > > > > > Hi,
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > I see that I cannot implement DELETE & PUT operations $ref
> > > > > > Collections.
> > > > > > Is
> > > > > > this by design? or a missing feature in beta3?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > I want to DELETE a specific relationship between a source and one
> > > > > > of
> > > > > > the
> > > > > > target entities in a 1-* relationship. I don't see a way to do it?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Any help is greatly appreciated.
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Thanks
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Anil
> > > > > 
> > > > 
> > > 
> > 
> 

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Anil G <gv...@gmail.com>.
so it must be using the processors internally right? how does it work if
the ODataHandler cannot make the right call on the Processors - since it
isn't implemented?

Or is the ServiceHandler a different implementation layer independent of
ODataHandler?

On Tue, Jul 21, 2015 at 3:34 PM, Ramesh Reddy <ra...@redhat.com> wrote:

> See the ServiceHandler support for PUT in references here
> https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L377
>  and
> https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L413
>
> Ramesh..
>
> ------------------------------
>
> Hi Ramesh
>
> thanks. yes I found that it was missing in ODataHandler code in beta3. But
> was wondering if that's what spec would have said. I could see that there
> was a PUT on $ref explained so I knew if was a deficit on beta3. Just
> wanted to confirm.
>
> Thanks & Regards
> Anil
>
>
> On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy <ra...@redhat.com> wrote:
>
>> Anil,
>>
>> See
>> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081
>> and
>> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332 for
>> the OData spec support.
>>
>> As per support in "beta-3", I believe I added much of these into
>> "ServiceHandler" interface, not sure on Processor interface methods.  You
>> can always debug into "ODataHandler" or "ServiceDispatcher" classes to see
>> if feature is implemented or not. If you find something not implemented you
>> can open JIRA with details.
>>
>> Thanks
>>
>> Ramesh..
>>
>> ------------------------------
>>
>> hi everyone,
>>
>> can somebody help me here as I am stuck on how to address these usecases.
>> Is this because it's not allowed in the spec (which I am still not able to
>> figure out or just not available in beta3 yet?)
>>
>> Thanks
>> Anil
>>
>> On Mon, Jul 20, 2015 at 4:07 PM, Anil G <gv...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I see that I cannot implement DELETE & PUT operations $ref Collections.
>>> Is this by design? or a missing feature in beta3?
>>>
>>> I want to DELETE a specific relationship between a source and one of the
>>> target entities in a 1-* relationship. I don't see a way to do it?
>>>
>>> Any help is greatly appreciated.
>>>
>>> Thanks
>>> Anil
>>>
>>
>>
>>
>
>

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Ramesh Reddy <ra...@redhat.com>.
See the ServiceHandler support for PUT in references here https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L377 and https://github.com/rareddy/olingo-odata4/blob/master/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/DataRequest.java#L413 

Ramesh.. 

----- Original Message -----

> Hi Ramesh

> thanks. yes I found that it was missing in ODataHandler code in beta3. But
> was wondering if that's what spec would have said. I could see that there
> was a PUT on $ref explained so I knew if was a deficit on beta3. Just wanted
> to confirm.

> Thanks & Regards
> Anil

> On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy < rareddy@redhat.com > wrote:

> > Anil,
> 

> > See
> > http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081
> > and
> > http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332
> > for the OData spec support.
> 

> > As per support in "beta-3", I believe I added much of these into
> > "ServiceHandler" interface, not sure on Processor interface methods. You
> > can
> > always debug into "ODataHandler" or "ServiceDispatcher" classes to see if
> > feature is implemented or not. If you find something not implemented you
> > can
> > open JIRA with details.
> 

> > Thanks
> 

> > Ramesh..
> 

> > > hi everyone,
> > 
> 

> > > can somebody help me here as I am stuck on how to address these usecases.
> > > Is
> > > this because it's not allowed in the spec (which I am still not able to
> > > figure out or just not available in beta3 yet?)
> > 
> 

> > > Thanks
> > 
> 
> > > Anil
> > 
> 

> > > On Mon, Jul 20, 2015 at 4:07 PM, Anil G < gvnanils@gmail.com > wrote:
> > 
> 

> > > > Hi,
> > > 
> > 
> 

> > > > I see that I cannot implement DELETE & PUT operations $ref Collections.
> > > > Is
> > > > this by design? or a missing feature in beta3?
> > > 
> > 
> 

> > > > I want to DELETE a specific relationship between a source and one of
> > > > the
> > > > target entities in a 1-* relationship. I don't see a way to do it?
> > > 
> > 
> 

> > > > Any help is greatly appreciated.
> > > 
> > 
> 

> > > > Thanks
> > > 
> > 
> 
> > > > Anil
> > > 
> > 
> 

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Anil G <gv...@gmail.com>.
Hi Ramesh

thanks. yes I found that it was missing in ODataHandler code in beta3. But
was wondering if that's what spec would have said. I could see that there
was a PUT on $ref explained so I knew if was a deficit on beta3. Just
wanted to confirm.

Thanks & Regards
Anil


On Tue, Jul 21, 2015 at 2:16 PM, Ramesh Reddy <ra...@redhat.com> wrote:

> Anil,
>
> See
> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081
> and
> http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332 for
> the OData spec support.
>
> As per support in "beta-3", I believe I added much of these into
> "ServiceHandler" interface, not sure on Processor interface methods.  You
> can always debug into "ODataHandler" or "ServiceDispatcher" classes to see
> if feature is implemented or not. If you find something not implemented you
> can open JIRA with details.
>
> Thanks
>
> Ramesh..
>
> ------------------------------
>
> hi everyone,
>
> can somebody help me here as I am stuck on how to address these usecases.
> Is this because it's not allowed in the spec (which I am still not able to
> figure out or just not available in beta3 yet?)
>
> Thanks
> Anil
>
> On Mon, Jul 20, 2015 at 4:07 PM, Anil G <gv...@gmail.com> wrote:
>
>> Hi,
>>
>> I see that I cannot implement DELETE & PUT operations $ref Collections.
>> Is this by design? or a missing feature in beta3?
>>
>> I want to DELETE a specific relationship between a source and one of the
>> target entities in a 1-* relationship. I don't see a way to do it?
>>
>> Any help is greatly appreciated.
>>
>> Thanks
>> Anil
>>
>
>
>

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Ramesh Reddy <ra...@redhat.com>.
Anil, 

See http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc406398081 and http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html#_Toc406398332 for the OData spec support. 

As per support in "beta-3", I believe I added much of these into "ServiceHandler" interface, not sure on Processor interface methods. You can always debug into "ODataHandler" or "ServiceDispatcher" classes to see if feature is implemented or not. If you find something not implemented you can open JIRA with details. 

Thanks 

Ramesh.. 

----- Original Message -----

> hi everyone,

> can somebody help me here as I am stuck on how to address these usecases. Is
> this because it's not allowed in the spec (which I am still not able to
> figure out or just not available in beta3 yet?)

> Thanks
> Anil

> On Mon, Jul 20, 2015 at 4:07 PM, Anil G < gvnanils@gmail.com > wrote:

> > Hi,
> 

> > I see that I cannot implement DELETE & PUT operations $ref Collections. Is
> > this by design? or a missing feature in beta3?
> 

> > I want to DELETE a specific relationship between a source and one of the
> > target entities in a 1-* relationship. I don't see a way to do it?
> 

> > Any help is greatly appreciated.
> 

> > Thanks
> 
> > Anil
> 

Re: [Olingo for V4] PUT & DELETE on $ref Collection

Posted by Anil G <gv...@gmail.com>.
hi everyone,

can somebody help me here as I am stuck on how to address these usecases.
Is this because it's not allowed in the spec (which I am still not able to
figure out or just not available in beta3 yet?)

Thanks
Anil

On Mon, Jul 20, 2015 at 4:07 PM, Anil G <gv...@gmail.com> wrote:

> Hi,
>
> I see that I cannot implement DELETE & PUT operations $ref Collections. Is
> this by design? or a missing feature in beta3?
>
> I want to DELETE a specific relationship between a source and one of the
> target entities in a 1-* relationship. I don't see a way to do it?
>
> Any help is greatly appreciated.
>
> Thanks
> Anil
>