You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Frederic Souchu (JIRA)" <ji...@apache.org> on 2015/04/08 16:42:13 UTC

[jira] [Created] (OLINGO-625) EntitySet JSON serializer outputs only base type, not actual instance fields

Frederic Souchu created OLINGO-625:
--------------------------------------

             Summary: EntitySet JSON serializer outputs only base type, not actual instance fields
                 Key: OLINGO-625
                 URL: https://issues.apache.org/jira/browse/OLINGO-625
             Project: Olingo
          Issue Type: Bug
          Components: odata4-server
    Affects Versions: (Java) V4 4.0.0-beta-02
            Reporter: Frederic Souchu


An entity set defined with a base type 'PlanItem' will always be serialized using base type properties, regardless of the actual objects in the set ('Flight' or 'Event' instances)

For reference, the Trips reference service produces the 'correct' output, e.g. serializes actual types, not only 'PlanItem' fields:
http://services.odata.org/V4/(S(q24kmcmzy4slj1gfcisdytwp))/TripPinServiceRW/People('russellwhyte')/Trips(0)/PlanItems

Incorrect Olingo output:
{code:JavaScript}
{
	"@odata.context" : "$metadata#PlanItems",
	"value" : [ {
		"PlanItemId" : 11,
		"ConfirmationCode" : "JH58493",
		"StartsAt" : "2014-01-01T06:15:00Z",
		"EndsAt" : "2014-01-01T11:35:00Z",
		"Duration" : "PT0S",
	}, {
		"PlanItemId" : 13,
		"ConfirmationCode" : "JH38143",
		"StartsAt" : "2014-01-04T17:55:00Z",
		"EndsAt" : "2014-01-04T20:45:00Z",
		"Duration" : "PT0S"
	}, {
		"PlanItemId" : 12,
		"ConfirmationCode" : "4372899DD",
		"StartsAt" : "2014-01-02T13:00:00Z",
		"EndsAt" : "2014-01-02T16:00:00Z",
		"Duration" : "PT3H"
	}]
}
{code}






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)