Crete definition only if doctrine.orm.entity_manager has Defined