 <p>Instead of doing this: <code>public static final TitleType MR = new TitleType(1, "Mr");</code></p> <p>You should use the EntityManager to fetch that Object. Otherwhise Hibernate will notice, that this Object (with id 1) is already stored, but since you did not load it, the entity manager does not have it inside its own collection -> that's a detached entity.</p> <p>So, you should do:</p> <pre><code>TitleType MR = em.find(TitleType.class, 1); Person p = new Person(...); p.setTitleType(MR); em.merge(p); </code></pre>