[ 
https://issues.apache.org/jira/browse/OLINGO-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dattatray updated OLINGO-1267:
------------------------------
    Description: 
*1]Following is metadata*
 <Schema Namespace="ChildEntityns" 
xmlns="http://docs.oasis-open.org/odata/ns/edm";>
 <EntityType Name="A">
 <Key>
 <PropertyRef Name="Id" />
 </Key>
 <Property Name="Id" Type="Edm.Int32" Nullable="false" />
 <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
 <NavigationProperty Name="B" Type="Collection(ChildEntityns.B)" 
ContainsTarget="true" />
 <Annotation Term="ChildEntityns.PluralName" String="As" />
 </EntityType>
 <EntityType Name="B">
 <Key>
 <PropertyRef Name="Id" />
 </Key>
 <Property Name="Id" Type="Edm.Int32" Nullable="false" />
 <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
 <NavigationProperty Name="A" Type="ChildEntityns.A" Nullable="false" 
ContainsTarget="true" />
 <Annotation Term="ChildEntityns.PluralName" String="Bs" />
 </EntityType>
 <EntityContainer Name="ChieldCNT">
 <EntitySet Name="Aentity" EntityType="ChildEntityns.A" />
 </EntityContainer>
 </Schema>

**2] method[POST]=> 
[http://localhost:8085/MagicXpiOData/ChildEntityns.OData_1/Aentity*]*
 {
 "Id":1,
 "Name": "A",
 "B":[

{ "Id":1, "Name": "B" }

]

}

*3]Response of new entity creation(generated response contains only simple 
properties of entity)*

{ "@odata.context": "$metadata#Aentity", "Id": 1, "Name": "A" }

*4]My question: Is it possible to generate response(Containing with navigation 
properties also) like following*
 {
 "@odata.context": "$metadata#Aentity",
 "Id": 1,
 "Name": "A",
 "B":[

{ "Id":1, "Name": "B" }

]
 }

  was:
*1]Following is metadata*
 <Schema Namespace="ChildEntityns" 
xmlns="http://docs.oasis-open.org/odata/ns/edm";>
 <EntityType Name="A">
 <Key>
 <PropertyRef Name="Id" />
 </Key>
 <Property Name="Id" Type="Edm.Int32" Nullable="false" />
 <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
 <NavigationProperty Name="B" Type="Collection(ChildEntityns.B)" 
ContainsTarget="true" />
 <Annotation Term="ChildEntityns.PluralName" String="As" />
 </EntityType>
 <EntityType Name="B">
 <Key>
 <PropertyRef Name="Id" />
 </Key>
 <Property Name="Id" Type="Edm.Int32" Nullable="false" />
 <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
 <NavigationProperty Name="A" Type="ChildEntityns.A" Nullable="false" 
ContainsTarget="true" />
 <Annotation Term="ChildEntityns.PluralName" String="Bs" />
 </EntityType>
 <EntityContainer Name="ChieldCNT">
 <EntitySet Name="Aentity" EntityType="ChildEntityns.A" />
 </EntityContainer>
 </Schema>
 
*2] method[POST]=> 
http://localhost:8085/MagicXpiOData/ChildEntityns.OData_1/Aentity*
 {
 "Id":1,
 "Name": "A",
 "B":[{
 "Id":1,
 "Name": "B"
 }]
 
 }

*3]Response of new entity creation(generated response contains only simple 
properties of entity)*
{
 "@odata.context": "$metadata#Aentity",
 "Id": 1,
 "Name": "A"
}

*4]My question: Is it possible to generate response(Containing with navigation 
properties also) like following*
{
 "@odata.context": "$metadata#Aentity",
 "Id": 1,
 "Name": "A",
 "B":[{
 "Id":1,
 "Name": "B"
 }]
}


> Is it possible to generate deep insert response with navigation properties?
> ---------------------------------------------------------------------------
>
>                 Key: OLINGO-1267
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1267
>             Project: Olingo
>          Issue Type: Question
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.4.0
>         Environment: windows
>            Reporter: Dattatray
>            Priority: Major
>             Fix For: (Java) V4 4.5.0
>
>
> *1]Following is metadata*
>  <Schema Namespace="ChildEntityns" 
> xmlns="http://docs.oasis-open.org/odata/ns/edm";>
>  <EntityType Name="A">
>  <Key>
>  <PropertyRef Name="Id" />
>  </Key>
>  <Property Name="Id" Type="Edm.Int32" Nullable="false" />
>  <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
>  <NavigationProperty Name="B" Type="Collection(ChildEntityns.B)" 
> ContainsTarget="true" />
>  <Annotation Term="ChildEntityns.PluralName" String="As" />
>  </EntityType>
>  <EntityType Name="B">
>  <Key>
>  <PropertyRef Name="Id" />
>  </Key>
>  <Property Name="Id" Type="Edm.Int32" Nullable="false" />
>  <Property Name="Name" Type="Edm.String" Nullable="false" Unicode="false" />
>  <NavigationProperty Name="A" Type="ChildEntityns.A" Nullable="false" 
> ContainsTarget="true" />
>  <Annotation Term="ChildEntityns.PluralName" String="Bs" />
>  </EntityType>
>  <EntityContainer Name="ChieldCNT">
>  <EntitySet Name="Aentity" EntityType="ChildEntityns.A" />
>  </EntityContainer>
>  </Schema>
> **2] method[POST]=> 
> [http://localhost:8085/MagicXpiOData/ChildEntityns.OData_1/Aentity*]*
>  {
>  "Id":1,
>  "Name": "A",
>  "B":[
> { "Id":1, "Name": "B" }
> ]
> }
> *3]Response of new entity creation(generated response contains only simple 
> properties of entity)*
> { "@odata.context": "$metadata#Aentity", "Id": 1, "Name": "A" }
> *4]My question: Is it possible to generate response(Containing with 
> navigation properties also) like following*
>  {
>  "@odata.context": "$metadata#Aentity",
>  "Id": 1,
>  "Name": "A",
>  "B":[
> { "Id":1, "Name": "B" }
> ]
>  }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to