Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013509Openbravo ERPA. Platformpublic2010-06-02 17:162010-06-17 00:00
iperdomo 
mtaal 
normalmajoralways
closedfixed 
202.6.30-gentoo-r5
2.50MP18 
 
Core
No
0013509: In a OBCriteria you can't use list() after a count() call
The count() call modifies the query executed against the database. After a count() call you can't use list() of the same OBCriteria object.
Apply the attached patch and run the first test
You'll get something like:

Error list() after count()
java.lang.ClassCastException: java.lang.Integer cannot be cast to org.openbravo.model.ad.system.SystemInformation
No tags attached.
diff DalTest.java.diff (904) 2010-06-02 17:16
https://issues.openbravo.com/file_download.php?file_id=2621&type=bug
Issue History
2010-06-02 17:16iperdomoNew Issue
2010-06-02 17:16iperdomoAssigned To => mtaal
2010-06-02 17:16iperdomoFile Added: DalTest.java.diff
2010-06-02 17:19iperdomoDescription Updatedbug_revision_view_page.php?rev_id=462#r462
2010-06-07 08:21alostaleStatusnew => scheduled
2010-06-07 20:13hgbotCheckin
2010-06-07 20:13hgbotNote Added: 0028076
2010-06-07 20:13hgbotStatusscheduled => resolved
2010-06-07 20:13hgbotResolutionopen => fixed
2010-06-07 20:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/eb86e4c97fe58662b8647e72f55cdb5cac230acc [^]
2010-06-08 04:22hudsonbotCheckin
2010-06-08 04:22hudsonbotNote Added: 0028163
2010-06-16 10:16iperdomoNote Added: 0028489
2010-06-16 10:16iperdomoStatusresolved => closed
2010-06-17 00:00anonymoussf_bug_id0 => 3017328

Notes
(0028076)
hgbot   
2010-06-07 20:13   
Repository: erp/devel/pi
Changeset: eb86e4c97fe58662b8647e72f55cdb5cac230acc
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Jun 07 20:12:45 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/eb86e4c97fe58662b8647e72f55cdb5cac230acc [^]

fixes issue 13509: In a OBCriteria you can't use list() after a count() call

---
M src-test/org/openbravo/test/dal/IssuesTest.java
M src/org/openbravo/dal/service/OBCriteria.java
---
(0028163)
hudsonbot   
2010-06-08 04:22   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/eb86e4c97fe5 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/6875c9c0ac89 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17566.obx [^]
(0028489)
iperdomo   
2010-06-16 10:16   
Tested on pi @ rev ced7876366af