Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012903
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2010-04-07 17:282010-04-19 21:12
ReportershuehnerView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version2.50MP15
StatusclosedFix in branchFixed in SCM revisionc56bf3953565
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012903: Error in OBQuery when using with hql clause having order by but not where part

DescriptionUsing the following code snippet fails to execute:

products = OBDal.getInstance().createQuery(Product.class, " as e order by name");
products.setFilterOnReadableOrganization(false);
products.setFilterOnReadableClients(false);
assertTrue(products.count() > 0);

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1949)
    at org.openbravo.dal.service.OBQuery.createQueryString(OBQuery.java:215)
    at org.openbravo.dal.service.OBQuery.count(OBQuery.java:140)
Steps To ReproduceUse attached junit testcases
TagsNo tags attached.
Attached Filesdiff file icon testcases_for_12903.diff [^] (1,742 bytes) 2010-04-07 17:31 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0012853pi closedmtaal OBQuery count not working with a query with aliases 

-  Notes
(0025952)
shuehner (administrator)
2010-04-07 17:32

Note: testcases just excercise various hql queries combinations of alias,where,order by.

The testcases perhaps need to be extended with specific ones depending on the fix done for this issue.
(0025953)
shuehner (administrator)
2010-04-07 17:32

Adding related as issue was found reviewing 12853.
(0025968)
hgbot (developer)
2010-04-08 09:36

Repository: erp/devel/pi
Changeset: c56bf39535655e046da329134721985ec44bc916
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Apr 08 09:47:48 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c56bf39535655e046da329134721985ec44bc916 [^]

fixes issue 12903: Error in OBQuery when using with hql clause having order by but not where part

---
M src-test/org/openbravo/test/dal/IssuesTest.java
M src/org/openbravo/dal/service/OBQuery.java
---
(0026217)
marvintm (developer)
2010-04-14 19:05

The code looks fine and the tests run correctly
(0026435)
hudsonbot (developer)
2010-04-19 21:12

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/c56bf3953565 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]

- Issue History
Date Modified Username Field Change
2010-04-07 17:28 shuehner New Issue
2010-04-07 17:28 shuehner Assigned To => mtaal
2010-04-07 17:31 shuehner File Added: testcases_for_12903.diff
2010-04-07 17:32 shuehner Note Added: 0025952
2010-04-07 17:32 shuehner Relationship added related to 0012853
2010-04-07 17:32 shuehner Note Added: 0025953
2010-04-08 09:36 hgbot Checkin
2010-04-08 09:36 hgbot Note Added: 0025968
2010-04-08 09:36 hgbot Status new => resolved
2010-04-08 09:36 hgbot Resolution open => fixed
2010-04-08 09:36 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c56bf39535655e046da329134721985ec44bc916 [^]
2010-04-14 19:05 marvintm Note Added: 0026217
2010-04-14 19:05 marvintm Status resolved => closed
2010-04-14 19:05 marvintm Fixed in Version => 2.50MP15
2010-04-15 00:00 anonymous sf_bug_id 0 => 2987423
2010-04-19 21:12 hudsonbot Checkin
2010-04-19 21:12 hudsonbot Note Added: 0026435


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker