When to use EntityManager.find() vs EntityManager.getReference() with JPA
I usually use getReference method when i do not need to access database state (I mean getter method). Just to change state (I mean setter method). As you should know, getReference returns a proxy object which uses a powerful feature called automatic dirty checking. Suppose the following public class Person { private String name; private … Read more