Move ORM to Doctrine/ORM base classes