[hibernate-dev] HHH 869 (Collections of value type in the Criteria API).
Donnchadh Ó Donnabháin
donnchadh at gmail.com
Wed Jun 17 09:45:37 EDT 2009
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