-->
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: Persisting set of enums to SET datatype?
PostPosted: Tue Aug 23, 2005 5:36 pm 
Beginner
Beginner

Joined: Thu Jan 06, 2005 6:11 am
Posts: 32
Location: Magdeburg, Germany
This might be relatively quick to answer, depending on if its possible at all ....

Somewhere in the docs I read that sets of primitive types are not supported by hibernate. Is there any possibility to overcome this limitation by e.g. writing a UserType?

In my application, I have user accounts, and each of these accounts is assigned one ore more "roles", like free_member, administrator...

I planned to put the different roles in a Set of role enums like that:

public interface Account ... {

public Set<Role> getRoles();


As I'm using MySQL, this would be best persisted as a SET column in the user account table, saving me an additional table and a join on each time a security check is performed.

Any suggestions to this?

Best regards
Gregor Melhorn


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 23, 2005 5:46 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I plan to add this feature in the following days.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 23, 2005 5:50 pm 
Beginner
Beginner

Joined: Thu Jan 06, 2005 6:11 am
Posts: 32
Location: Magdeburg, Germany
Thank you very much!!! That's really good news!


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.