0 Replies Latest reply on Dec 3, 2007 9:49 AM by Axel Mueller

    Removal of child entity in 1:N CMR using NOT NULL foreign ke

    Axel Mueller Newbie

      Hi!

      Having a 1:N CMR (JBoss 4.04, EJB 2.1!) we would like to remove a child entity. There is a NOT NULL foreign key constraint on the parent ID column of the child entity. Removal of a child entity fails because JBoss attempts first destroy the relationship by setting the foreign key column to null before removal.

      How can we remove a child entity without removing the NOT NULL constraint?

      Important container configuration parameters:


      commit-option: B
      sync-on-commit-only:false
      insert-after-ejb-post-create:true


      Thanks in advance,

      Axel