[3.8] Fix 1457 : EntityManager:clear should not be called in a controller