Hibernate - how to map an EnumSet

Posted by al nik on Stack Overflow See other posts from Stack Overflow or by al nik
Published on 2010-03-08T16:34:43Z Indexed on 2010/03/08 16:36 UTC
Read the original article Hit count: 373

Filed under:
|
|
|

Hi all,
I've a Color Enum

public enum color { GREEN, WHITE, RED } 

and I have MyEntity that contains it.

public class MyEntity {
   private Set<Color> colors;
   ...

Do you know how to map this in the relative Hibernate hbm.xml?
Do I need a UserType or there's an easiest way?
Thanks

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about set