Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » enum collection
enum collection [message #381277] Mon, 08 September 2008 19:14 Go to next message
Edward is currently offline Edward
Messages: 11
Registered: July 2009
Junior Member
How mapping enum collection with eclipselink?

List<OrigenDeAtencion> origenDeAtencion;

OrigenDeAtencion is a enum.

Thanks!!
Re: enum collection [message #381280 is a reply to message #381277] Wed, 10 September 2008 14:07 Go to previous message
James is currently offline James
Messages: 272
Registered: July 2009
Senior Member
You can map a collection on enums using a @BasicCollection mapping in
EclipseLink. You can use a Converter to translate the values if you need
to.

In JPA 1.0 the only way to map it is using a basic mapping that serializes
the value to a binary field. You could also convert the enum to a class
and map it as an Entity and a OneToMany or ManyToMany.

-- James
Previous Topic:TRIM in JPA NamedQuery
Next Topic:Is there a simple way to trim() Strings as loaded from database into Entity?
Goto Forum:
  


Current Time: Fri Oct 31 08:35:20 GMT 2014

Powered by FUDForum. Page generated in 0.11562 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software