You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Madhawa Kasun Gunasekara <ma...@gmail.com> on 2015/08/25 10:36:03 UTC

[OlingoV4] How to get entity using etag

Hi All,

I was always trying ids (reference keys) to get the enitity, I hope there
is a way to retrieve entity by using etag.
Any help on how to create the request.

Thanks
Madhawa

RE: [OlingoV4] How to get entity using etag

Posted by Frédéric SOUCHU <Fr...@ingenico.com>.
Madhawa,
First, the etag semantic should be transparent to the client, not reused as part of the odata query.

Say a client calls http://mycompany.com/odata.svc/customers(mail='me@company.com'), the server generates an etag from an internal primary key (or a hash of it).
If the client calls the service again (exact URL matching is handled by the HTTP stack), the server can bypass the 'odata' lookup by using the etag to directly get the entity back.

A bit convoluted, but could certainly help in case get the entity or evaluating the filter is complex enough. And clearly not supported by Olingo out of the box!

Regards,
Frederic


From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: 25 August 2015 16:09
To: user@olingo.apache.org
Subject: RE: [OlingoV4] How to get entity using etag

Hi Madhawa,

I am not sure I understand your question. You can`t use the etag as a key to query data. The only way is to use the defined key properties which can be seen in the metadata document. ETags can only be used to prevent concurrent modifications or send “Not Modiefied” responses to save response times.

Does this answer your question?

Best Regards,
Christian

From: Madhawa Kasun Gunasekara [mailto:madhawa30@gmail.com]
Sent: Dienstag, 25. August 2015 10:36
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: [OlingoV4] How to get entity using etag

Hi All,
I was always trying ids (reference keys) to get the enitity, I hope there is a way to retrieve entity by using etag.
Any help on how to create the request.
Thanks
Madhawa

RE: [OlingoV4] How to get entity using etag

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

I am not sure I understand your question. You can`t use the etag as a key to query data. The only way is to use the defined key properties which can be seen in the metadata document. ETags can only be used to prevent concurrent modifications or send “Not Modiefied” responses to save response times.

Does this answer your question?

Best Regards,
Christian

From: Madhawa Kasun Gunasekara [mailto:madhawa30@gmail.com]
Sent: Dienstag, 25. August 2015 10:36
To: user@olingo.apache.org
Subject: [OlingoV4] How to get entity using etag

Hi All,
I was always trying ids (reference keys) to get the enitity, I hope there is a way to retrieve entity by using etag.
Any help on how to create the request.
Thanks
Madhawa