Openbravo Issue Tracking System - Openbravo ERP |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0012903 | Openbravo ERP | A. Platform | public | 2010-04-07 17:28 | 2010-04-19 21:12 |
|
| Reporter | shuehner | |
| Assigned To | mtaal | |
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | |
| Platform | | OS | 5 | OS Version | |
| Product Version | pi | |
| Target Version | | Fixed in Version | 2.50MP15 | |
| Merge Request Status | |
| Review Assigned To | |
| OBNetwork customer | No |
| Web browser | |
| Modules | Core |
| Support ticket | |
| Regression level | |
| Regression date | |
| Regression introduced in release | |
| Regression introduced by commit | |
| Triggers an Emergency Pack | No |
|
| Summary | 0012903: Error in OBQuery when using with hql clause having order by but not where part |
| Description | Using 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 Reproduce | Use attached junit testcases |
| Proposed Solution | |
| Additional Information | |
| Tags | No tags attached. |
| Relationships | | related to | defect | 0012853 | pi | closed | mtaal | OBQuery count not working with a query with aliases |
|
| Attached Files | testcases_for_12903.diff (1,742) 2010-04-07 17:31 https://issues.openbravo.com/file_download.php?file_id=2414&type=bug |
|
| 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:28 | shuehner | OBNetwork customer | => No |
| 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 | |
|
Notes |
|
|
|
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. |
|
|
|
|
|
Adding related as issue was found reviewing 12853. |
|
|
|
(0025968)
|
|
hgbot
|
|
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
---
|
|
|
|
|
|
The code looks fine and the tests run correctly |
|
|
|
|
|