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

    @OneToOne and constraint

    Kirill Trofimov Newbie

      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.