Yes, so you first set the FK field in Y to NULL, add it to the UOW, add X to the UOW and set the commit order in such a way that updates are run before deletes. If the FK in Y isn't nullable, you have to delete the Y instance, so add that first to the UOW, then X. You can also change the FK constraint in the database to support cascades, e.g. let the DB set the FK to null OR delete the Y instance