2 Replies Latest reply on Sep 18, 2006 7:23 AM by abuayyub

    Insert Triggers and Hibernate

    Tom Lien Newbie

      I have an ejb3 entity has an IDENTITY field and a before insert trigger. The problem is that hibernate sets the IDENTITY value of my entity to 0 every time causing NonUniqueObjectExceptions when I create more than one of them in a session. I verified that it is the trigger that is causing it because it does not happen when I remove it.

      I need the triggers due to legacy applications that insert into to table. Are there any ways to workaround this?

      Thanks