update the Principle, move the EntityManager to transient to remove the
database error