ArrayList « Map « JPA Q&A

1. Map ArrayList with Hibernate

I just coded my first Hibernate examples. The database connection works and I understand how I can map a String from a POJO to a database field:

private String firstName;
And in the mapping ...

2. Hibernate question - map ArrayList

I m wondering how can i map a class having arrayList which should keep its values to another table. Let take some code for example.

Class Person
int id;
String name;
ArrayList<String> childNames

in db has ...

3. Using java.util.HashMap with Hibernate with key as some class and value as ArrayList of objects

I definitely read most of the posts regarding this on googleand stackoverflow but I am not getting a clear idea about this. Scenario:

public enum UserLicenseType {

@Entity(name = ...

4. Mapping multiple ArrayLists to the same table

Hi, i'm pretty new at using Hibernate and i've come across a problem that does not seem to be covered by the documentation. Simply put, how do you map multiple lists to the same table? I have a data structure that looks like this: /** the SUBSDATA record id */ private int id; /** record number */ private int subRecNumber; /** ...