-->
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.  [ 3 posts ] 
Author Message
 Post subject: Trim type for DB2/AS400 for Hibernate 3
PostPosted: Fri Mar 04, 2005 5:05 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi,

anyone knows how to implements the new methods on the UserType for DB2 for Hibernate 3?

see : http://www.hibernate.org/90.html

It is only for Hibernate 2!

thanks

Etienne.



Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 5:17 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
I found this from DefaultValueIntegerType.java in the Hibernate tests source code. Will it works for the TrimmedString userType?

// From example DefaultValueIntegerType
public int hashCode(Object x) throws HibernateException {
return x.hashCode();
}

public Object assemble(Serializable cached, Object owner)
throws HibernateException {
return cached;
}

public Serializable disassemble(Object value) throws HibernateException {
return (Serializable) value;
}

public Object replace(Object original, Object target, Object owner)
throws HibernateException {
return original;
}


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 05, 2005 3:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well, what happened when you *tried* it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.