Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020611Openbravo ERPA. Platformpublic2012-05-25 13:122012-06-27 18:33
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0MP13 
Core
No
0020611: OBCriteria doesn't support ScrollabeResults
OBCriteria doesn't support ScrollabeResults.

For some reason it raises org.hibernate.MappingException: Unknown entity: org.openbravo.model.common.businesspartner.BusinessPartner:
      OBCriteria<BusinessPartner> c = OBDal.getInstance().createCriteria(BusinessPartner.class);
      ScrollableResults iterator = c.scroll(ScrollMode.FORWARD_ONLY);

Note that replacing q.scroll(ScrollMode.FORWARD_ONLY) with q.list() works, so it seems not to be a problem in the mapping.

Might it be a Hibernate issue: https://forum.hibernate.org/viewtopic.php?f=1&t=987983 [^]
Performance
related to design defect 0020515 closed alostale OBCriteria creates contention at JVM 
diff 20611.diff (2,990) 2012-06-03 22:17
https://issues.openbravo.com/file_download.php?file_id=5272&type=bug
Issue History
2012-05-25 13:12alostaleNew Issue
2012-05-25 13:12alostaleAssigned To => alostale
2012-05-25 13:12alostaleModules => Core
2012-06-01 07:55alostaleTag Attached: Performance
2012-06-01 07:55alostaleRelationship addedhas duplicate 0020515
2012-06-01 08:00alostaleRelationship replacedrelated to 0020515
2012-06-03 22:17mtaalFile Added: 20611.diff
2012-06-03 22:18mtaalNote Added: 0049594
2012-06-05 15:36hgbotCheckin
2012-06-05 15:36hgbotNote Added: 0049622
2012-06-05 15:36hgbotStatusnew => resolved
2012-06-05 15:36hgbotResolutionopen => fixed
2012-06-05 15:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a0b44c4d6906d5e2b397b320dea4c0f104524ad8 [^]
2012-06-27 18:33alostaleNote Added: 0050194
2012-06-27 18:33alostaleStatusresolved => closed
2012-06-27 18:33alostaleFixed in Version => 3.0MP13

Notes
(0049594)
mtaal   
2012-06-03 22:18   
The attached diff solves this issue.
(0049622)
hgbot   
2012-06-05 15:36   
Repository: erp/devel/pi
Changeset: a0b44c4d6906d5e2b397b320dea4c0f104524ad8
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jun 05 13:07:50 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a0b44c4d6906d5e2b397b320dea4c0f104524ad8 [^]

Fixes issue 20611: OBCriteria doesn't support ScrollabeResults
Use the entity name instead of the classname to initialize the hibernate criteria

---
M src-test/org/openbravo/test/dal/IssuesTest.java
---
(0050194)
alostale   
2012-06-27 18:33   
Code reviewed and verified in pi@db25f47ad0a4