What is difference between bag vs idbag in hibernate?
I have two entites i.开发者_StackOverflowe.employee information and transfer information maintains upto till date.So In those sceniores which can i choose bag or idbag?
Read about Hibernate collection performance to understand the difference.
An idbag lets you add a surrogate generated column to your many2many table
You have to add the generator in your definition, and also make the other side of the many2many relationship the "inverse"
精彩评论