Another, possibly unrelated issue, to using this current model is that Hibernate performs some deletes when populating the two tables:
Hibernate: insert into queue_names (queueName, type) values (?, 'U') select scope_identity()
Hibernate: insert into queue_names (queueName, type) values (?, 'U') select scope_identity()
Hibernate: insert into queue_names (queueName, type) values (?, 'G') select scope_identity()
Hibernate: insert into queue_names (queueName, type) values (?, 'G') select scope_identity()
Hibernate: insert into queue_names (queueName, type) values (?, 'G') select scope_identity()
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Hibernate: delete from queue_memb where qid=? and gid=?
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Hibernate: delete from queue_memb where qid=? and gid=?
Hibernate: insert into queue_memb (qid, gid) values (?, ?)
Simple question: why? Probably requires a complicated answer :(
Is it the fact that it inserts *all* instances of the main class into both tables and then only deletes those that aren't in the Set? I doubt this due to the number of rows inserted and deleted in the queue_memb table.
Thanks.
|