posted 16 years ago
Hi!
I have an item class and a store class that are mapped by many to many
An item can be visible in many stores.
When I update an item hibernate goes thru all my items and inserts and delets. 4000 times since there is 4000 items.
What is the proper way of implementing many to many? I don't think I have got this right. How do I prevent the delete and insert.
Here is my annotation mapping
The store class
in the item class
How can I add an item to a store and delete an item to a store the best way without having to update 4000 queries in the database?