More work on the doctrine entity