This should be the only line in this method, within the not-null check.  I don't understand what you are doing with the orderId or the criteria - are they needed or used at all?  Also, I would have thought that the query should be "delete Obs where order = :order"), and then :order is associated with the Order object, and let hibernate do it's thing.