[
https://issues.apache.org/jira/browse/OLINGO-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13889357#comment-13889357
]
Ralf Handl commented on OLINGO-139:
-----------------------------------
OData 4.0 adds stream properties that are similar to media resources in that
they are not part of the entity payload but addressed similar to navigation
properties, see
http://docs.oasis-open.org/odata/odata-json-format/v4.0/cos01/odata-json-format-v4.0-cos01.html#_Toc372793075.
You can have an arbitrary number of stream properties, e.g. two of them.
GET ~/Entities(1) will get you the entity without the two binary "streams"
GET ~/Entitites(1)/StreamOne will get you the raw, unencoded binary of the
first stream property
GET ~/Entitites(1)/StreamTwo will get you the raw, unencoded binary of the
second stream property
> Use of binary data
> ------------------
>
> Key: OLINGO-139
> URL: https://issues.apache.org/jira/browse/OLINGO-139
> Project: Olingo
> Issue Type: Question
> Affects Versions: V2 1.0.0
> Reporter: M Carissimi
> Assignee: Stephan Klevenz
>
> Hello,
> I have read your sample on how to use Media Resources by invoking method
> setHasStream(true) on an EntityType and I can see how this can be used to
> retrieve binary data using $value.
> I am trying to understand how this differs from the use of Binary properties.
> From what I can see, the media content of Binary properties is embedded (in
> an encoded format) in the odata feed, where as media content accessed via the
> $value property is only returned when requested.
> I have a table where binary data is stored in two separate columns. Do I need
> to use Binary properties for these two columns and always embed the encoded
> binary data in the odata feed or can I use the $value method to retrieve
> binary data only when requested? How would I configure this as the
> setHasStream(true) is applicable to the whole EntityType rather than to a
> single property?
> Cheers
> Miki
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)