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

mibo resolved OLINGO-1114.
--------------------------
    Fix Version/s: (Java) V4 4.7.0
       Resolution: Fixed

> NULL value change the type when convert ClientEntity to a HttpEntity
> --------------------------------------------------------------------
>
>                 Key: OLINGO-1114
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1114
>             Project: Olingo
>          Issue Type: Bug
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Jin ZHAO
>            Assignee: mibo
>            Priority: Major
>              Labels: easyfix, unit-test
>             Fix For: (Java) V4 4.7.0
>
>         Attachments: TestEntityConvert.java, result_compare.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Please see my attached test code:
> ClientEntity add a property "revenue" with null value. and type is "Decimal"
> But when convert to HttpClient type. the type change to "String"
> When I use this for Microsoft CRM create entity, I got this kind of error 
> message.
> {code}
> {
>   "error":{
>     "code":"","message":"A value was encountered that has a type name that is 
> incompatible with the metadata. The value specified its type as 'Edm.String', 
> but the type specified in the metadata is 'Edm.Decimal'.","innererror":{
>       "message":"A value was encountered that has a type name that is 
> incompatible with the metadata. The value specified its type as 'Edm.String', 
> but the type specified in the metadata is 
> 'Edm.Decimal'.","type":"Microsoft.Crm.CrmHttpException","stacktrace":"   at 
> Microsoft.Crm.Extensibility.OData.CrmODataUtilities.ValidateInputParameters(ModelStateDictionary
>  controllerModelState)\r\n   at 
> Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySet(String 
> entitySetName, EdmEntityObject entityObject)\r\n   at lambda_method(Closure , 
> Object , Object[] )\r\n   at 
> System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object
>  instance, Object[] methodParameters)\r\n   at 
> System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object
>  instance, Object[] arguments)\r\n   at 
> System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext
>  controllerContext, IDictionary`2 arguments, CancellationToken 
> cancellationToken)\r\n--- End of stack trace from previous location where 
> exception was thrown ---\r\n   at 
> System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at 
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
>  task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n 
>   at 
> System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n---
>  End of stack trace from previous location where exception was thrown ---\r\n 
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at 
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
>  task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n 
>   at 
> System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n---
>  End of stack trace from previous location where exception was thrown ---\r\n 
>   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at 
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
>  task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n 
>   at 
> System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
>     }
>   }
> }
> {code}
> *So the type of null value property should not be changed!*



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to