I have a two objects with simple @OneToMany relationship which looks as follows:
parent:
@Entity
public class ParentAccount {
@Id
@GeneratedValu
Something like this does not work?
@Entity
public class Account {
@Id
@GeneratedValue
private long id;
private String name;
@ManyToOne(cascade={CascadeType.ALL})
@JoinColumn(name="manager_id")
private Account manager;
@OneToMany((fetch = FetchType.EAGER, mappedBy="manager")
private Set linkedAccounts = new HashSet();
}