0 Replies Latest reply on Dec 11, 2006 11:14 AM by Evan Nail

    EJB3 Update instead of delete

    Evan Nail Newbie

      JBoss 4.0.4 GA

      I'm trying to work out a cascade delete issue with an old schema.

      User Object has a list of Permission Objects. (I can publish more code if u need)

      When I delete user, hibernate is creating Update statements and trying to set the user_id in permission table to null, what I want is for hibernate to write a delete statement for the permission.

      I've tried playing around with the mapping and I googled up something about using @SQLDelete to override the sql but this isnt an available annotation from the client lib directory. Not sure where its from.

      Can someone give me a hint on how I can accomplish this.