@Entity
@Table(name = "TEST_EC_PERSON")
public class Person {
@Id
@GeneratedValue
private long id;
@Version
private long version;
@Column(name = "NAME", length = 100)
private String name;
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "TEST_EC_ADDRESS", joinColumns=@JoinColumn(name="person_id"))
private Set<Address> addresses = new HashSet<Address>();