0 Replies Latest reply on Mar 8, 2006 1:57 AM by Dave Chen

    foreign key constraint violation

    Dave Chen Master

      class Department {

      class Employee{

      public Department getDepartment()


      Employee table refers to department table (foreign key).
      When I tried to delete a department, I got an exception
      "foreign key constraint violation"

      I want Hibernate/database to ignore the constraints and delete the department. how?

      How to tell Hibernate not to generate the foreign key constraints?
      @NotFound(action=NotFoundAction.IGNORE) does not work for this purpose, only for reading, ignore when not found.

      Thank you very much for your help.