This is expected behavior. JPA 2.1 spec, section 2.9 says the following: "Associations that are specified as OneToOne or OneToMany support use of the orphanRemoval option. The following behaviors apply when orphanRemoval is in effect: If an entity that is the target of the relationship is removed from the relationship (by setting the relationship to null or removing the entity from the relationship collection), the remove opera- tion will be applied to the entity being orphaned.* The remove operation is applied at the time of the flush operation.* ..." |