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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012143
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminorhave not tried2010-02-04 20:542010-03-10 18:29
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version2.50MP12
StatusclosedFix in branchFixed in SCM revisionff77f743663b
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

0012143: OBQuery class should add convenience method uniqueResult similar to the OBCriteria class

DescriptionThe OBCriteria class offers a uniqueResult method to fetch a single result which is easier than .list().get(0).

The OBQuery class should add the same method.
Proposed SolutionAdd a typed

E uniqueResult() method, which returns a single result with the type of the query it was created with.

To support more generic untyped queries (i.e. for projections) add a second method:

Object uniqueResultObject().
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0023975)
hgbot (developer)
2010-02-04 21:07

Repository: erp/devel/pi
Changeset: ff77f743663bc9a8f5c5bb523c371aa380e435e6
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Feb 04 21:07:09 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ff77f743663bc9a8f5c5bb523c371aa380e435e6 [^]

Fixed 12143: add uniqueResult + uniqueResultObject convenience methods
both allow to return a single result similar to the one in OBCriteria

---
M src/org/openbravo/dal/service/OBQuery.java
---
(0024092)
mtaal (manager)
2010-02-10 12:59

Added testcase and works fine see IssuesTest
(0024296)
hudsonbot (developer)
2010-02-15 17:36

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

- Issue History
Date Modified Username Field Change
2010-02-04 20:54 shuehner New Issue
2010-02-04 20:54 shuehner Assigned To => shuehner
2010-02-04 21:07 hgbot Checkin
2010-02-04 21:07 hgbot Note Added: 0023975
2010-02-04 21:07 hgbot Status new => resolved
2010-02-04 21:07 hgbot Resolution open => fixed
2010-02-04 21:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ff77f743663bc9a8f5c5bb523c371aa380e435e6 [^]
2010-02-10 12:59 mtaal Note Added: 0024092
2010-02-10 12:59 mtaal Status resolved => closed
2010-02-10 12:59 mtaal Fixed in Version => 2.50MP12
2010-02-11 00:00 anonymous sf_bug_id 0 =>
2010-02-15 17:36 hudsonbot Checkin
2010-02-15 17:36 hudsonbot Note Added: 0024296
2010-03-10 18:29 anonymous sf_bug_id => 2968014


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker