I have Entity1 and Entity2.
Entity1 have ref (@OneToOne) on Entity2.
If i remove Enity2, i recive exception "ConstraintViolationException".
How i can remove Entity2 without:
... Entity1.setEntity2(null); em.merge(Entity1.); em.remove(Entity2); ...
Consider specifying the CASCADING between the two. Also have a look out for Hibernates Remove Orphaned annotation.
Alex
ejb3workshop.com