Change EntityManager to use toCsv