-->
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.  [ 1 post ] 
Author Message
 Post subject: Custom datatype question, which interface to extend
PostPosted: Mon Nov 22, 2004 11: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  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.