[hibernate-dev] Bulk delete behavior for collection tables

Christian Beikov christian.beikov at gmail.com
Thu Jan 11 11:56:58 EST 2018


Hey,

so HHH-5529 <https://hibernate.atlassian.net/browse/HHH-5529> defines a 
feature which I'd like to work on but want to hear opinions first.

Currently, bulk deletes only clear join tables of the affected entity 
type. I guess one could argue that this was done because collection 
table in contrast to join table entries should be bound to the entity 
table lifecycle by using an FK with delete cascading. Or maybe it just 
wasn't implemented because nobody stepped up.

I'd like to fill this gap and implement the deletion of the collection 
table entries, but make that and the join table entry deletion configurable.

Does anyone have anything against that?

Would you prefer a single configuration option for join table and 
collection table clearing? If we enable that option by default, 
collection tables will then be cleared whereas currently users would get 
a FK violation. Don't know if that can be classified as breaking behavior.

Or have two configuration options? Even then, would we enable collection 
table entry deletion by default?

-- 

Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*


More information about the hibernate-dev mailing list