[
https://issues.apache.org/jira/browse/OLINGO-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873473#comment-13873473
]
Christian Amend commented on OLINGO-121:
----------------------------------------
Hi Miki,
we will put this in the 1.1.0 version. My proposal would be to introduce a
switch at serialization which will show the type information in the entry. Only
type information which is specified in the EDM will be shown. If you have a
requirement to set this information yourself I think this is a feature request
for version 1.2.0 since we would like to produce a 1.1.0 release as soon as
possible.
I would not show the type information by default because:
1. It would create an overhead in the payload especially in a feed case.
2. It would be a perfomance regression during serialization again especially in
the feed case.
3. This feature cannot be used with the Json format and thus makes
interoperability between the two formats difficult.
Best Regards,
Christian
> Support metadata:type attribute in Entity Properties
> ----------------------------------------------------
>
> Key: OLINGO-121
> URL: https://issues.apache.org/jira/browse/OLINGO-121
> Project: Olingo
> Issue Type: Improvement
> Components: odata2-core
> Affects Versions: V2 1.0.0
> Reporter: M Carissimi
> Assignee: Christian Amend
> Fix For: V2 1.1.0
>
>
> Certain OData consumers (i.e. PowerPivot for Microsfot Excel) require that
> the metadata:type attribute is set for all Property values in an Entry, for
> example:
> {code}
> <entry xmlns="http://www.w3.org/2005/Atom"
> xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
> xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
> xml:base="https://dev.energysys.com/odatapas/resourcenolinks.svc/">
> ...
> <content type="application/xml">
> <m:properties>
> <d:FROM_DATE
> m:type="Edm.DateTime">2013-07-01T00:00:00</d:FROM_DATE>
> <d:TO_DATE m:type="Edm.DateTime" m:null="true"/>
> <d:IS_ACTIVE m:type="Edm.Boolean">true</d:IS_ACTIVE>
> <d:ORGANISATION>EnergySys Support</d:ORGANISATION>
> <d:ORDER_NUMBER m:type="Edm.Int32">2</d:ORDER_NUMBER>
> </m:properties>
> </content>
> </entry>
> {code}
> The Olingo library does not specify the metadata:type attribute for
> properties and this means that software relying on that property can't
> correctly consume data generated with Olingo.
> This library should support a way to set the metadata:type attribute for
> properties. This could be done by allowing the producer to explicitly set the
> type for each property (as done in odata4j) or it could be automatically
> added by using the type definition in the EntityType associated with the data.
> This enhancement has been raised following discussion with Michael Boltz (see
> OLINGO-118 for details)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)