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
|