JPA Methodin jakarta.persistence.EntityManagervoid clear() Clear the persistence context, causing all managed entities to become detached. Changes made to entities that have not already been flushed to the database will never be made persistent. Since:JPA 1.0