made doctrine conversion optional

cc @fabpot @borisguery