olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dattatray (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OLINGO-1268) Olingo don't give error message like "The non-nullable property is missing" for navigationProperty
Date Thu, 31 May 2018 07:14:00 GMT
Dattatray created OLINGO-1268:
---------------------------------

             Summary: Olingo don't give error message like "The non-nullable property is missing"
for navigationProperty
                 Key: OLINGO-1268
                 URL: https://issues.apache.org/jira/browse/OLINGO-1268
             Project: Olingo
          Issue Type: Question
          Components: odata4-server
    Affects Versions: (Java) V4 4.4.0
            Reporter: Dattatray
             Fix For: (Java) V4 4.5.0


*Olingo gives error message for non-nullable simple property of entity but not navigationProperty*

**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]Request[post]http://localhost:8085/MagicXpiOData/ChildEntityns.OData_1/Aentity*
in the following body i don't given the "Name" property of entity A
 {
            "Id":1,
            
            "B":[{
		            "Id":1,
		            "Name": "B"
            }]
           
  }
*3]Response(It gives error for missing property of entity A)  *
  {
    "error": {
        "code": null,
        "message": "The non-nullable property 'Name' is missing."
    }
}

*4]Request[post]http://localhost:8085/MagicXpiOData/ChildEntityns.OData_1/Aentity*
In following body i don't given the "Name" property of navigationProperty B
 {
            "Id":1,
            "Name": "A",
            "B":[{
		            "Id":1
		           
            }]
           
  }
*5]Reseponse(but not given the error message for navigation property)*
{
    "@odata.context": "$metadata#Aentity",
    "Id": 1,
    "Name": "A"
}



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

Mime
View raw message