I have an n: m association between the two classes User and Role, implemented as a bag with lazy = "extra". The association is stored in the sind association table, the user can have many roles, and the role can be associated with many users.
Now, when I add a new role to the user, hibernate emmits sql code, which first deletes all the entries in the eassociation table and then adds them again and the new association.
I would like to know why this is happening and how I can get rid of this behavior.
Ralph
source
share