[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] eclipselink 1.1 getSingleResult(): incompatible change
|
Gordon Yorke a écrit :
Section 3.6.1 (pg 68 of Final Release)
Here is the bug report :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=243205
--Gordon
Gordon Yorke a écrit :
The return type depends on what is being queried. If it is a single
Entity or a JPQL Constructor query then a single instance of the
selected type is returned. If it is a query that selects multiple
values then an Object[] of those values are returned. This is
specified in the specification.
What is the return type you are seeing.
It seems it did change from 1.0.2 to 1.1. We have working code which
was based on the old way. Is this documented somewhere?
Where can I find this in the specs? I couldn't find any precise
information for now.
For those interested, jpa specs section 3.6.1:
[...]
When native SQL queries are used, the SQL result
set mapping (see section 3.6.6), determines how many items (entities,
scalar values, etc.) are returned. If
multiple items are returned, the elements of the query result are of
type Object[]. If only a single
item is returned as a result of the SQL result set mapping or if a
result class is specified, the elements of
the query result are of type Object.
[...]
--
Yannick Majoros
SGSI/SIPS
+32 10 47 9442
Développement d'applications :
* reengineering
* gestion des doctorats
* mobilité des étudiants