fix to allow passing parameters to Doctrine entities when serializing