The solution for this is proposed on StackOverflow on this question: http://stackoverflow.com/questions/23169296/hibernate-4-nonuniqueobjectexception-embedded-id