Un necessary deletion of records from joining tables while fetching the data
posted 8 years ago
I have a many to many assosciation between two tables which i accomplished using a joing table.The joining table contains some additional columns apart from the primary keys of both the tables.These columns i mapped using "composite-element" tag in side a Set.
While retreiving the data from the object graph a pair of insert and delete queries are being fired on the joining table.What is the need of deleting and inserting the data when we are only fetching it. Any reasons or any alternative solultions for avoiding the unnecessary delete/inserts.