I have 3 tables Users, Archivements and ArchivemetnsUSers. This is a relathionship Many-To-Many.
My problem is that i want save a new user in my DataBase but, i dont want save/update the archivement assigned to user, because i have only N pre-existent archivements.
Then, when i go to save hibernate session for my user... i get a exception: the selected archivement exists in DataBase, and hibernate cant save duplicate PrimaryKey.
How i avoid this problem?
Any annotation? or trick?