[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694?page=c...
]
Shawn Clowater commented on HHH-3694:
-------------------------------------
The issue I'm currently running into is the fact that the criteria I've supplied
to scroll isn't unique and it is ignoring my DistinctRootEntityResultTransformer that
I was applying.
Even with your suggested change the Distinct Transformer is going to be useless since it
would try to distinct on a single tuple basis and just return itself resulting in still
having duplicates. I'm not seeing a clear way use a transformer to distinct the
results in this case. Path of least resistance for me is to handle it as I'm
processing but I'm throwing the distinct out for discussion.
ResultTransformer not used when scroll() is used on a named SQLQuery
--------------------------------------------------------------------
Key: HHH-3694
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3694
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.1
Environment: Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8
Reporter: Oscar Pearce
Priority: Minor
Attachments: sqlqueryrestrans.zip
If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the
query, the ResultTransformer is never used. The unit test in the attached Maven project
shows this.
The fix seems simple - a one-line change in
org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer
resultTransformer, String[] queryReturnAliases). The sense of the test of
resultTransformer against null should be reversed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira