Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033703Openbravo ERPA. Platformpublic2016-08-12 17:002016-08-24 15:28
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
caristu
Core
No
0033703: Accidental double query in View generation
View generation (i.e. first open of Sales Order window) trigger double query by calling .list() twice in DatasourceServiceProvider:

- if (!qTable.list().isEmpty()) {
- Table table = qTable.list().get(0);
-
Performance
related to feature request 0033767 closed platform Add code to auto-detect 'accidental double query' on same OBQuery or OBCriteria object 
related to design defect 0036898 new Triage Finance Performance issues when using DAL 
Issue History
2016-08-12 17:00shuehnerNew Issue
2016-08-12 17:00shuehnerAssigned To => shuehner
2016-08-12 17:00shuehnerModules => Core
2016-08-12 17:00shuehnerTriggers an Emergency Pack => No
2016-08-12 17:01shuehnerTag Attached: Performance
2016-08-23 14:32hgbotCheckin
2016-08-23 14:32hgbotNote Added: 0089301
2016-08-23 14:32hgbotStatusnew => resolved
2016-08-23 14:32hgbotResolutionopen => fixed
2016-08-23 14:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b05271bc5119125620ebed83117b57a7c42729af [^]
2016-08-23 14:33shuehnerReview Assigned To => caristu
2016-08-23 14:44shuehnerRelationship addedrelated to 0033767
2016-08-24 15:28caristuNote Added: 0089350
2016-08-24 15:28caristuStatusresolved => closed
2016-08-24 15:28caristuFixed in Version => 3.0PR16Q4
2017-09-19 18:48markmm82Relationship addedrelated to 0036898

Notes
(0089301)
hgbot   
2016-08-23 14:32   
Repository: erp/devel/pi
Changeset: b05271bc5119125620ebed83117b57a7c42729af
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Aug 12 17:02:22 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b05271bc5119125620ebed83117b57a7c42729af [^]

Fixed 33703. Avoid double query by using .uniqueResult instead of twice .list()

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java
---
(0089350)
caristu   
2016-08-24 15:28   
Code review + testing OK: now using just one query to retrieve the table using its name on getDataSourceFromTableName() method