Fixed DQL query bug; Added array field conversion

There was a bug when DQL query is used: Doctrine2: 
   !$em->getMetadataFactory()->hasMetadataFor($matches[1])

didn't recognized my Entity..

Also, array fields output was not possible, i added an is_array condition which converts array fields