[hibernate-dev] HHH 869 (Collections of value type in the Criteria API).

David Mansfield hibernate at dm.cobite.com
Wed Jun 17 10:52:19 EDT 2009


Hi,

I'm not going to do the JUnit stuff until I get a commitment that my
work won't be wasted.  Last I heard, the CriteriaQueryTranslator was
going away and therefore the problem would be fixed by building AST
trees so that the queries execute the same way HQL does.  If this is
indeed the case, then the maintainers don't really want my code.

If, however, they do want my code, then they can review it and give me
feedback and I'm absolutely happy to do whatever it takes to get the
code accepted.  

Really, I'd be HAPPY to do it!  I love hibernate and would love to help
the project, but I'm also very busy and don't want to waste my time.

I will take your advice and take my WIP code and attach it to the JIRA
issue, (which I already did on the collection-of-criteria issue).

David


On Wed, 2009-06-17 at 14:45 +0100, Donnchadh Ó Donnabháin wrote:
> You should probably attach it to the JIRA issue (
> http://opensource.atlassian.com/projects/hibernate/browse/HHH-869 ) .
> Also the patch seems incomplete in that there appear to be no JUnit
> test cases included.
> 
>   Donnchadh
> 
> 2009/6/17 David Mansfield <hibernate at dm.cobite.com>:
> > [previously sent out from wrong account and it didn't make the list]
> >
> >
> > On Tue, 2009-06-09 at 21:34 -0500, Steve Ebersole wrote:
> >> On Tue, 2009-06-09 at 18:18 -0700, Daniel Pitts wrote:
> >>
> >> > That makes sense.  If I submit a patch that basically refactors the CQT
> >> > class, what might be considered when deciding on inclusion?
> >> You mean is regards to the "cleanup"?  Well, whether it makes sense
> >> AFAIAC.
> >>
> >> > I mean the propertyNames, propertyTypes, etc.. Are all empty arrays.
> >> > Maybe I've configured something incorrectly.
> >> That would be my guess.  What does the mapping look like?
> >>
> >> > >
> >> > > Is this a criterion/restriction you are trying to apply?
> >> > It can be, but it also may be a Projection.  I'm hoping that I can stick
> >> > to modifying only the CriteriaQueryTranslator class, but if I need to
> >> > dive deeper, then so be it.
> >> Not sure yet.
> >>
> >
> > I have already completed this and submitted it many times to the list.
> > I've implemented query of collection-of-value and
> > collection-of-component.  The code is working perfectly and passes the
> > test suite and has been in production here for many months.
> >
> > I kinda got tired of submitting it to the list, but I'll attach my
> > latest code.  I'd be really happy to split this into tiny pieces and
> > submit or whatever if there would be a commitment by the maintainers to
> > accept and apply this.
> >
> > This patch has the following problems which DO need to be fixed before
> > being incorporated upstream (besides the splitting into many pieces,
> > some of which are straight bug fixes or separate enhancements):
> >  * too much debugging code when enabled
> >  * unfinished ability to create Criteria object on component (currently
> > criteria needs to be on owning entity and property should have a '.')
> >
> > I'd really, really love for this to make it into Hibernate, and I'll do
> > whatever it takes, as long as I don't work in vain.
> >
> > In addition to the collection-of-value and collection-of-component the
> > following enhancements/fixes are included also:
> >
> > * give appropriate error message if Criteria is created on a component
> > (tried to implement this instead, but it's a but too hard and not really
> > necessary)
> >
> > * fix bug when extra "," is put on end of select list in very rare
> > circumstances (joinable.selectFragment(..) can return empty - maybe in
> > the case of a AbstrsactCollectionPersister.. not sure)
> >
> > * fix "bugs" (maybe introduced by me) in MessageHelper where
> > Serializable id's are cast as String's.  not sure how it happens but it
> > only happens when enabling DEBUG in certain packages.  just use
> > toString() wherever it occured (seems like it's using the identifier's
> > type, but this breaks when using a composite key maybe)
> >
> >
> >
> >
> > Thanks,
> > David
> >
> >
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> >




More information about the hibernate-dev mailing list