-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mapping for SQL SET type?
PostPosted: Tue May 11, 2004 9:35 am 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
Does Hibernate offer any convenient mapping for the SQL SET type?

From the MySQL manual: A SET is a string object that can have zero or more values, each of which must be chosen from a list of allowed values specified when the table is created.

I am thinking about Hibernate mapping an SQL SET to maybe a java.util.Set or an array of Strings.

Regards,

Andreas


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 10:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This should be easily doable using a custom UserType.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 11:52 am 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
Has anybody already implemented such a UserType and would be willing to share the code?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 12:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Just take a look at the existing UserType solutions in the Wiki, the code should be really trivial.


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