Hi,
When querying for a list of objects using ejb-ql, the keyword 'distinct'
is used to de-duplicate the result set and give a correct list of
objects. However I have noticed that everytime distinct is specifed in
the ejb-ql query it also gets specified in the sql query. I am curious
as the reasoning behind this. I understand that distinct is used to
remove duplicates from the SQL result set, but from what I can see, for
the majority of simple use cases the sql distinct is superflous.
Running the hibernate generated query without the distinct returns the
same results. I assume that the distinct is in there for are reason,
are there some more complicated use cases for which the distinct in
necessary?
My main concern is performance, is there anyway of performing an ejb-ql
"select distinct..." without hibernate issuing an sql "select distinct...".
Regards,
Michael Barker.
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev