[ 
https://issues.apache.org/jira/browse/OFBIZ-3700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856939#action_12856939
 ] 

Bob Morley commented on OFBIZ-3700:
-----------------------------------

Sure, but this is not suggesting that at all.  It is suggesting that when the 
entities were changed to use a BigDecimal instead of a Double for storage (work 
that Scott had completed I believe) and this set of entities appear to be 
missed.  The suggesting is changing the entity model from "floating-point" to 
"fixed-point" in the exact same manner as what was done with the other entities 
that went through this conversion.

The trouble with the service definition approach is that for general CRUD type 
services the definition is usually defined using an "auto-attributes" element.  
So what we run into now is a call to "createProductionRun" requires a quantity 
as a BigDecimal (as per its entity model).  The implementation takes that 
context and uses it to call "createWorkEffort" that requires a quantity as a 
Double ... and *poof*

The solution here was to either say "Double" is right for WorkEffort and the 
service implementation needs to convert from BgiDecimal -> Double before 
calling runSync OR the entity model is incorrect and we should convert it to 
"BigDecimal".  The latter is the one that Scott indicated was probably the 
correct solution.

> Convert WorkEffort (and related entities) quantities from Double -> BigDecimal
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3700
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3700
>             Project: OFBiz
>          Issue Type: Bug
>          Components: workeffort
>    Affects Versions: SVN trunk
>            Reporter: Bob Morley
>            Priority: Minor
>             Fix For: SVN trunk
>
>
> It appears that this entity was missed from the BigDecimal conversion.  Ran 
> into this when ProductionRunServices was attempting to create a WorkEffort 
> (it is passing the quantity to produce as a BigDecimal).  A different bug in 
> OFBIZ-3699 was causing an auto-convert of the field from BigDecimal to Double 
> (which was allowing ProductionRuns to be created).  At any rate, we should 
> convert this entity and any other quantity related entities in the WorkEffort 
> component.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to