Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025862Openbravo ERPA. Platformpublic2014-02-27 18:452014-03-15 16:13
caristu 
alostale 
immediateminoralways
closedfixed 
5
3.0MP30.3 
3.0PR14Q2 
shankarb
Core
Production - Confirmed Stable
2013-07-19
https://code.openbravo.com/erp/devel/pi/rev/7d6d644b9b9e3b9ca55c7be357af7bb86a257263 [^]
No
0025862: get_computedColumns() method returns null under some circumstances
get_computedColumns() method of the generated classes returns null under some circumstances, this causes a null pointer exception in the getName() of the classes related to tables that have computed columns.

For example, the following code throws the exception, when trying to convert the a new instantiated object into JSONObject:

Order myOrder = OBProvider.getInstance().get(Order.class);
DataToJsonConverter toJsonConverter = OBProvider.getInstance().get(
        DataToJsonConverter.class);
JSONObject json = toJsonConverterr.toJsonObject(myOrder, DataResolvingMode.FULL);
In Description
No tags attached.
related to design defect 00241043.0MP27 closed alostale Unnecessary evaluation of computed columns 
related to defect 0025773 closed alostale Error thrown in web services if the request includes a field that references a computed column 
Issue History
2014-02-27 18:45caristuNew Issue
2014-02-27 18:45caristuAssigned To => AugustoMauch
2014-02-27 18:45caristuModules => Core
2014-02-27 18:45caristuTriggers an Emergency Pack => No
2014-02-27 18:45caristuIssue Monitored: networkb
2014-02-27 18:46caristuRegression level => Production - Confirmed Stable
2014-02-27 18:46caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/7d6d644b9b9e3b9ca55c7be357af7bb86a257263 [^]
2014-02-27 18:46caristuversion => 3.0MP30.3
2014-03-03 09:02alostaleAssigned ToAugustoMauch => alostale
2014-03-03 09:02alostaleRelationship addedrelated to 0024104
2014-03-03 09:10alostaleSeveritymajor => minor
2014-03-03 09:10alostaleNote Added: 0064706
2014-03-03 09:11alostaleNote Added: 0064707
2014-03-03 09:35hgbotCheckin
2014-03-03 09:35hgbotNote Added: 0064708
2014-03-03 09:35hgbotStatusnew => resolved
2014-03-03 09:35hgbotResolutionopen => fixed
2014-03-03 09:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3cdbbbf58782679e31fba0d2bf1df2ab8ce8cfa7 [^]
2014-03-03 09:35hgbotCheckin
2014-03-03 09:35hgbotNote Added: 0064709
2014-03-03 09:41hgbotCheckin
2014-03-03 09:41hgbotNote Added: 0064710
2014-03-03 09:41alostaleReview Assigned To => shankarb
2014-03-03 09:58alostaleRelationship addedrelated to 0025773
2014-03-03 10:38alostaleRegression date => 2013-07-19
2014-03-03 17:38hudsonbotCheckin
2014-03-03 17:38hudsonbotNote Added: 0064760
2014-03-03 17:38hudsonbotCheckin
2014-03-03 17:38hudsonbotNote Added: 0064761
2014-03-03 17:38hudsonbotCheckin
2014-03-03 17:38hudsonbotNote Added: 0064762
2014-03-15 16:13shankarbNote Added: 0065191
2014-03-15 16:13shankarbStatusresolved => closed
2014-03-15 16:13shankarbFixed in Version => PR14Q2

Notes
(0064706)
alostale   
2014-03-03 09:10   
Regression present since mp27
(0064707)
alostale   
2014-03-03 09:11   
It fails when trying to convert to json a newly created object that has not already been persisted in db.
(0064708)
hgbot   
2014-03-03 09:35   
Repository: erp/devel/pi
Changeset: 3cdbbbf58782679e31fba0d2bf1df2ab8ce8cfa7
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 03 09:30:34 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3cdbbbf58782679e31fba0d2bf1df2ab8ce8cfa7 [^]

fixed bug 25862: NPE serializing to JSON a non persisted Order

  Computed columns is null when object is not persisted yet, it should return
  null instead of failing

---
M src/org/openbravo/base/gen/entity.ftl
---
(0064709)
hgbot   
2014-03-03 09:35   
Repository: erp/devel/pi
Changeset: e7a2966e5278e9c112b8aea700275d62970569dc
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 03 09:35:08 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e7a2966e5278e9c112b8aea700275d62970569dc [^]

related to bug 25862: added test case

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
M src-test/org/openbravo/test/dal/ComputedColumnsTest.java
---
(0064710)
hgbot   
2014-03-03 09:41   
Repository: erp/devel/pi
Changeset: 52f5288bc3dd89adc2e740ef92df0633475a5e89
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 03 09:40:29 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/52f5288bc3dd89adc2e740ef92df0633475a5e89 [^]

related to bug 25862: removed debug code

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java
---
(0064760)
hudsonbot   
2014-03-03 17:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8d1e52794b1e [^]
Maturity status: Test
(0064761)
hudsonbot   
2014-03-03 17:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8d1e52794b1e [^]
Maturity status: Test
(0064762)
hudsonbot   
2014-03-03 17:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8d1e52794b1e [^]
Maturity status: Test
(0065191)
shankarb   
2014-03-15 16:13   
Code reviewed and verified in pi changeset 09baf685138e.