Fix ORM code

delete() doesn't work on related resultsets