[hibernate-dev] [UPDATED] implement criteria API query of collection-of-components and collection-of-values

David Mansfield hibernate at dm.cobite.com
Fri Jan 23 14:58:16 EST 2009


Hi,

Although I've gotten feedback that this won't necessarily be included
as-is, or against current versions etc., since I have to update it as I
track newer Hibernate core versions (we use this modification
internally), I figure it might be of use or interest to the dev.
community.

This is the updated patch, against 3.3.1GA

Changes from last time include:

* rediffed against 3.3.1
* change to slf4j for logging
* fix the crude hack in CriteriaJoinWalker to what seems to be the
correct implementation.  The issue here is complicated and not-at-all
understood by me completely.

The method in question, generateTableAlias, seems to do (at least) two
things in the CriteriaJoinWalker, one of which is to update the internal
'userAlias' list based on whether the Joinable 'consumesEntityAlias'.
This behavior needed to remain completely unmodified, which my previous
patch did not do.  However, the reason I needed to modify this is that
some Joinables which DO NOT 'conumeEntityAlias' still need to provide an
SQL alias for the table.  

Deciding which ones, exactly, need to do this was complicated, and I'm
not sure this is currently correct.

However, it now passes the test suite, which it didn't before.

Thanks,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hib-core-query-collection-of-elements-3_3_1-ver4.patch
Type: text/x-patch
Size: 22773 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20090123/228c547c/attachment.bin 


More information about the hibernate-dev mailing list