Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Can I persist a Map containing a List as Value

You will likely need an extra object to do this.  Something like:

private Map<String, ListHolder> instructions;

@Entity
public class ListHolder{
  @id
  private int id;

  private List instructions;

...
}

It should be pretty easy to write some business methods that make this mapping transparent to the users of the API.

-Tom

adi@xxxxxxxxxxxx wrote:
Hi

I persisted a map like this:
	private Map<String, String> instructions;

How can I persist a map that contains a List as value?
	private Map<String, List<String>> instructions;

Thanks a lot!

Regards Adrian

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top