Hi.
I'm working on a small system and I want to achieve the following results. I want to have two entities, User and Group, which basically look like this:
class @Entity User {
@Id int id;
@ManyToOne(option=false) Group group;
...
}
class @Entity Group {
@Id int id;
@OneToMany(mappedBy="group") List<User> users;
@OneToOne User owner;
}