You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a Search.
2. Add exactly one fetch.
3. Set fetchMode to FETCH_LIST or FETCH_ARRAY.
4. Run the Search in any Generic or General DAO.
EXPECTED RESULT:
List of Lists with one element each or list of Arrays with one element each.
ACTUAL RESULT:
Both fetch modes return just a List of Objects. Each object is what should
be the single element in the List or Array.
This is the default behavior of Hibernate. We need to find a way to
override it. And perhaps we should have a new fetch mode FETCH_SINGLE.
The reason this behavior is undesirable for us is that searches may be
dynamically built by application users in a custom search or something and
we don't want to have to write special code for the exception where they
only select one column to display.
Original issue reported on code.google.com by dwolvert on 6 Aug 2008 at 1:55
The text was updated successfully, but these errors were encountered:
Turns out the problem was only with fetch mode FETCH_ARRAY. We had been using
the
default ResultTransformer for this which has the behavior where if there is one
field
in the result it uses that field by itself but if there are more it puts them
in an
array.
We implemented our own result transformer to use for FETCH_ARRAY. It always
returns
an array.
Original comment by dwolvert on 6 Aug 2008 at 2:14
Original issue reported on code.google.com by
dwolvert
on 6 Aug 2008 at 1:55The text was updated successfully, but these errors were encountered: