Sometimes use wrong type castings for BigDecimal:
I have observed that for typecasting in groovy, we have used the wrong coding
pattern like
(BigDecimal) 0
It should be like
0 as BigDecimal
Note that this does not apply to decimal because in case of decimal, the default
type is always BigDecimal in Groovy.
Thanks: Pritam Kute for spotting the issue in OFBIZ-11843
(OFBIZ-10948)
Now correctly creates the CurrencyDimension using currency.uomId
No need for delegator.setNextSeqId(), looking at (now removed)
DimensionServices.xml confused me.
Thanks: Pierre Smits for report
(OFBIZ-10948)
There is a bug with loadCurrencyDimension in DimensionServices.groovy
It shows when running quickInitDataWarehouse.
The problem is this Minilang expression is missing in DimensionServices.groovy:
<sequenced-id sequence-name="CurrencyDimension" field="currencyDim.dimensionId"/>
Adding
delegator.setNextSeqId(currencyDim)
is enough.
- Deleted the old mini-lang service file
- Updated the service definitions with the new groovy methods
- Added a new file with the groovy implementation (with minor enhancement) of all the Dimension services
As the services deal with lists, there could be scenarios where the enterprise comprises of several thousand products, and so used the EntityListIterator instead of fetching the entire list.