Added method, detachEntity($entity)