[jira] [Created] (OLINGO-1178) pojogen-maven-plugin generates code that can't be compiled
Furer Alexander created OLINGO-1178: --- Summary: pojogen-maven-plugin generates code that can't be compiled Key: OLINGO-1178 URL: https://issues.apache.org/jira/browse/OLINGO-1178 Project: Olingo Issue Type: Bug Components: odata4-ext Affects Versions: (Java) V4 4.3.0 Reporter: Furer Alexander If the `CsdlProperty` name contains hyphen character, for example *my-column* , the plugin generates corresponding java class attribute with getter and setter : {code} @org.apache.olingo.ext.proxy.api.annotations.Property(name = "my-column"..) String my-column; String getMy-column(); void setMy-column(String my-column); {code} This code can't be compiled. Please normalize the attribiute name while processing the template. Thanks -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (OLINGO-1108) Edm.Decimal not supported in OData Create requests (POST)
[ https://issues.apache.org/jira/browse/OLINGO-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Amend resolved OLINGO-1108. - Resolution: Not A Bug Assignee: Christian Amend Fix Version/s: V2 2.0.10 EDM.Decimal values must be Strings in a payload and not JSON Numbers according to the specification. So your client needs to be adjusted. See: http://www.odata.org/documentation/odata-version-2-0/json-format/ Edm.Decimal Literal form of Edm.Decimal as used in URIs formatted as a JSON string > Edm.Decimal not supported in OData Create requests (POST) > - > > Key: OLINGO-1108 > URL: https://issues.apache.org/jira/browse/OLINGO-1108 > Project: Olingo > Issue Type: Bug > Components: odata2-core >Affects Versions: V2 2.0.8 >Reporter: Patrick Haller >Assignee: Christian Amend > Fix For: V2 2.0.10 > > > We've got Edm.Decimal on a POST request (OData Create). > Upon sending the request, we see the following exception in the server log. > In JsonPropertyConsumer.readSimpleProperty()'s switch case, we have > type=Edm.Decimal > tokenType=JsonToken.NUMBER > and therefore end up with throwing INVALID_PROPERTY_VALUE. > *exception* > {quote}Caused by: org.apache.olingo.odata2.api.ep.EntityProviderException: > Provided value for the property 'Quantity' is not compatible with the > property. > at > org.apache.olingo.odata2.core.ep.consumer.JsonPropertyConsumer.readSimpleProperty(JsonPropertyConsumer.java:227) > at > org.apache.olingo.odata2.core.ep.consumer.JsonPropertyConsumer.readPropertyValue(JsonPropertyConsumer.java:169) > at > org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.handleName(JsonEntryConsumer.java:172) > at > org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.readEntryContent(JsonEntryConsumer.java:130) > at > org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.readSingleEntry(JsonEntryConsumer.java:93) > at > org.apache.olingo.odata2.core.ep.consumer.JsonEntityConsumer.readEntry(JsonEntityConsumer.java:57) > at > org.apache.olingo.odata2.core.ep.JsonEntityProvider.readEntry(JsonEntityProvider.java:315) > at > org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.readEntry(ProviderFacadeImpl.java:179) > at > org.apache.olingo.odata2.api.ep.EntityProvider.readEntry(EntityProvider.java:746) > at > org.apache.olingo.odata2.jpa.processor.core.ODataEntityParser.parseEntry(ODataEntityParser.java:64) > ... 66 common frames omitted{quote} > *Data Model classes* > *Java Client (Spring RestTemplate)* > {quote}class MyPostRequest { > @JsonProperty("Cost") > BigDecimal cost; > }{quote} > *Java Server (Olingo)* > {quote}class ProjectCost implements Serializable > { > // ... > @Column > private BigDecimal cost; > }{quote} > *$metadata* > {quote}http://schemas.microsoft.com/ado/2007/06/edmx; > Version="1.0"> > xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata; > m:DataServiceVersion="1.0"> > http://schemas.microsoft.com/ado/2008/09/edm; > Namespace="project"> > http://www.sap.com/Protocols/SAPData; Name="Project" > sap:label="Project"> > > > > http://www.sap.com/Protocols/SAPData; Name="LastUpdate" > Type="Edm.DateTime" Nullable="true" sap:label="Last Update"/> > http://www.sap.com/Protocols/SAPData; Name="Name" > Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Project"/> > http://www.sap.com/Protocols/SAPData; Name="ProjectType" > Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Type"/> > http://www.sap.com/Protocols/SAPData; Name="Responsible" > Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Person > Responsible"/> > http://www.sap.com/Protocols/SAPData; Name="Stage" > Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Stage"/> > http://www.sap.com/Protocols/SAPData; Name="Status" > Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Status"/> > > Relationship="project.Project_ProjectCost_One_Many0" FromRole="Project" > ToRole="ProjectCost"/> > > > > > > > > > > > > > MaxLength="255"/> > > > > MaxLength="255"/> > Nullable="true" MaxLength="255"/> > MaxLength="255"/> > > Relationship="project.Project_ProjectCost_One_Many0" FromRole="ProjectCost" > ToRole="Project"/> > > > > > > > > > > > > > > > > > Association="project.Project_ProjectCost_One_Many0"> > > > > > > > {quote} -- This message was sent by Atlassian JIRA (v6.4.14#64029)