[hibernate-dev] Problem with Properties of Embeddable Classes and Type Registry

Steve Ebersole steve at hibernate.org
Mon Jun 4 13:47:53 EDT 2012


Not sure.  Need to think about that one some more.

The problem there is that Components have their mapping information 
resolved differently from all other types.  Its a long standing problem 
in Hibernate that causes all kinds of issues.

On Mon 04 Jun 2012 11:17:44 AM CDT, Chris Pheby wrote:
> Hi,
>
> Would it be possible to apply the pull request https://github.com/hibernate/hibernate-orm/pull/335 mentioned previously?
>
> Thanks Chris
>
> -----Original Message-----
> From: Chris Pheby
> Sent: 10 May 2012 10:29
> To: 'Steve Ebersole'
> Cc: hibernate-dev at lists.jboss.org
> Subject: RE: [hibernate-dev] Problem with Properties of Embeddable Classes and Type Registry
>
> Hi Steve,
>
> Thanks for your reply. I decided to dig deeper and find the fix.
>
> The problem is that the type is being cached inside the Component class.
>
> I created the Jira issue at https://hibernate.onjira.com/browse/HHH-7310
> I also created a pull request for a test and the fix at https://github.com/hibernate/hibernate-orm/pull/335
>
> Regards Chris
>
> -----Original Message-----
> From: Steve Ebersole [mailto:steven.ebersole at gmail.com] On Behalf Of Steve Ebersole
> Sent: 01 May 2012 15:25
> To: Chris Pheby
> Cc: hibernate-dev at lists.jboss.org
> Subject: Re: [hibernate-dev] Problem with Properties of Embeddable Classes and Type Registry
>
> Hey Chris,
>
> That is not the expected behavior.  Myabe just an oversight in how components (embeddables) are handled?  If that is the behavior you see, I would consider that a bug.  Please create a JIRA and attach a test case as outlined @ http://hibernate.org/issuetracker
>
> If you want to give solving the problem a go, have a look @ https://github.com/hibernate/hibernate-orm/wiki/Contributing-Code
>
>
> On Tue 01 May 2012 05:02:07 AM CDT, Chris Pheby wrote:
>> Hello,
>>
>> The new type registry capability in Hibernate 4 and above is really useful. I have implemented an integrator that autoregisters some types, however what I have found is that whilst this works perfectly, the registered types are not being resolved correctly when they are used within @Embeddable classes.
>>
>> Is this the expected behaviour?
>>
>> I have tried debugging through the sources and it looks like the SessionFactory's TypeResolver is not used in the case of properties of such classes. See the comments at http://blog.jadira.co.uk/blog/2012/1/19/release-jadira-usertype-300cr1-with-support-for-joda-money-0.html#comments.
>>
>> Thanks Chris
>>
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> --
> steve at hibernate.org
> http://hibernate.org
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

--
steve at hibernate.org
http://hibernate.org


More information about the hibernate-dev mailing list