[ 
https://issues.apache.org/jira/browse/OLINGO-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887688#comment-13887688
 ] 

Stephan Klevenz commented on OLINGO-139:
----------------------------------------

Interesting use case. Well, OData supports media resources (../entity/$value) 
in case of your data unstructured content (one media) and structured data 
(properties). The content is excluded from property access to avoid unwanted 
downloads.

OData supports binary properties in case of data is structured but just type is 
binary. Here you can have multiple binary properties per type. In case of 
binary data is huge unwanted access to binary data needs to be considered. With 
$select option only wanted properties can be selected.

If binary data is stored in 2 columns then the question is can this be 
represented as a single resource? If yes then media resource could be the right 
modeling. 

> 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)

Reply via email to