I have a question concerning Hibernate 3.6.7 and JPA 2.0.
Consider following entities (some getters and setters are omitted for brevity):
@Entity pub
Managed this by just calling the empty() method. For this scenario,
parent.getChildren().isEmpty()
before
parent.getChildren().add(child);