Instead of doing this: public static final TitleType MR = new TitleType(1, "Mr");
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.
So, you should do:
TitleType MR = em.find(TitleType.class, 1);
Person p = new Person(...);
p.setTitleType(MR);
em.merge(p);