1 Reply Latest reply on Jan 11, 2006 3:16 AM by ejb3workshop

    @OneToOne and constraint

    trofimov

      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);
      ...

      Thanx.