add entity argument on entityManager->($entity)  accoding with doctrine flush() to flush a non managed entity