-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: UserType and nullSafeGet not called
PostPosted: Mon Oct 19, 2009 9:09 am 
Newbie

Joined: Mon Oct 19, 2009 8:55 am
Posts: 2
Hi All,

In a annotated class I have added my own usertype with the @Type annotation on the getter of the column:

@Type(type="my.package.MyUserType")

With debugging I was able to confirm this class is instantiated and the sqlTypes() method is called. however, the nullSafeGet() method is not called when I retrieve a list by HQL.

Can anyone point me in the right direction what I am doing wrong here ?

Kind regards,
Marco


Top
 Profile  
 
 Post subject: Re: UserType and nullSafeGet not called
PostPosted: Tue Oct 20, 2009 4:34 am 
Newbie

Joined: Mon Oct 19, 2009 8:55 am
Posts: 2
Some more information, it seems the usertype is properly called when I am getting a singe instance with the session.get(theclass.class,thekey) but when
I create a query:

query = session.createQuery("from Class where ....");
query.list()

the usertype is not used...

any ideas, hints or tips ?

Kind regards,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.