Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035509Openbravo ERPA. Platformpublic2017-03-14 13:122017-03-17 10:40
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
No
0035509: OBQuery is not working for queries without an alias and a select clause
OBQuery is not working for queries without an alias and a select clause.
1) Apply the attached patch, it contains two new tests: testOBQueryWithoutAlias and testOBQueryWithAlias. Both of them launch exactly the same query, but the second one includes an alias for the main entity of the query.

2) Run the tests. Notice that testOBQueryWithoutAlias fails. It is failing because an space is missing before the from clause:

Exception when creating query select descriptionfrom Currency where (iSOCode = :isoCode) and organization.id in ('0', 'E443A31992CB4635AFCAEABE7183CE85', 'B843C30461EA4501935CB1D125C9C25A', 'BAE22373FEBE4CCCA24517E23F0C8A48', 'DC206C91AA6A4897B44DA897936E0EC3', '19404EAD144C49A0AF37D54377CF452D', '2E60544D37534C0B89E765FE29BC0B43', '7BABA5FF80494CAFA54DEBD22EC46F01') and client.id in ('23C59575B9CF467C9620760EB255B389', '0') and active='Y'
 
No tags attached.
diff test.diff (2,145) 2017-03-14 13:12
https://issues.openbravo.com/file_download.php?file_id=10564&type=bug
Issue History
2017-03-14 13:12caristuNew Issue
2017-03-14 13:12caristuAssigned To => platform
2017-03-14 13:12caristuModules => Core
2017-03-14 13:12caristuTriggers an Emergency Pack => No
2017-03-14 13:12caristuAssigned Toplatform => caristu
2017-03-14 13:12caristuStatusnew => scheduled
2017-03-14 13:12caristuFile Added: test.diff
2017-03-14 13:14caristuSummaryOBQuery is not working for queries without an alias => OBQuery is not working for queries without an alias and a select clause
2017-03-14 13:14caristuDescription Updatedbug_revision_view_page.php?rev_id=14789#r14789
2017-03-14 13:16caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14791#r14791
2017-03-14 16:56hgbotCheckin
2017-03-14 16:56hgbotNote Added: 0095001
2017-03-14 16:56hgbotStatusscheduled => resolved
2017-03-14 16:56hgbotResolutionopen => fixed
2017-03-14 16:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/84ddadc11e413380f06b43baf784bb7e0b361180 [^]
2017-03-14 16:57caristuReview Assigned To => alostale
2017-03-15 20:22hudsonbotCheckin
2017-03-15 20:22hudsonbotNote Added: 0095299
2017-03-17 10:40alostaleNote Added: 0095360
2017-03-17 10:40alostaleStatusresolved => closed
2017-03-17 10:40alostaleFixed in Version => 3.0PR17Q2

Notes
(0095001)
hgbot   
2017-03-14 16:56   
Repository: erp/devel/pi
Changeset: 84ddadc11e413380f06b43baf784bb7e0b361180
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Mar 14 16:55:41 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/84ddadc11e413380f06b43baf784bb7e0b361180 [^]

fixes bug 35509: OBQuery without an alias and a select clause is not working

---
M src-test/src/org/openbravo/test/dal/DalTest.java
M src/org/openbravo/dal/service/OBQuery.java
---
(0095299)
hudsonbot   
2017-03-15 20:22   
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/54e102bef53e [^]
Maturity status: Test
(0095360)
alostale   
2017-03-17 10:40   
reviewed