[jboss-user] [EJB 3.0] - Re: How to map an array or a list of enums?

grettke_spdr do-not-reply at jboss.com
Tue Jun 12 14:59:27 EDT 2007


"waynebaylor" wrote : So, I was wrong about the array. Hibernate does support arrays, but they're rarely used since Hibernate can't optimize them like Collections.
  | 
  | As far as using enums, here are some links:
  | http://www.hibernate.org/270.html
  | http://forum.hibernate.org/viewtopic.php?t=933393
  | http://www.nabble.com/Java-5-Enums-Persistence-::-How-to-t3865408s2369.html
  | 
  | The solution may be bigger than your problem :)

Interesting. Thus far I haven't had a problem with (single) enums. I use the built in annotation.


  | @Enumerated(EnumType.ORDINAL)
  |     public InspectionPriorityEnum getPriority() {
  |         return priority;
  |     }
  | 

It is collections of enums that are vexing me. 

Is the approach taken in those links something akin to the solution for mapping collections?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053700#4053700

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053700



More information about the jboss-user mailing list