-->
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: MutableType vs UserType
PostPosted: Tue Nov 23, 2004 10:41 am 
Beginner
Beginner

Joined: Thu Oct 14, 2004 9:50 am
Posts: 43
Hi All,
I created a custom data type by extending MutableType, as it seemed to suit my needs best. All worked well, until i tried doing a session.find, and tried to bind a parameter using my type. I tried using Hibernate.custom(mytype) and got an exception stating that i must extend UserType.
I fixed/hacked the problem by implementing usertype (in addition to extending mutable type), and just having to add

Code:
public Object nullSafeGet(ResultSet arg0, String[] arg1, Object arg2) throws HibernateException, SQLException {
   return super.nullSafeGet(arg0, arg1);
}


is this ok, or do i need to pick one (mutabletype) or the other (usertype) to extend.

tnx.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 9:25 am 
Beginner
Beginner

Joined: Thu Oct 14, 2004 9:50 am
Posts: 43
Anyone?


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.