[hibernate-dev] Bulk delete behavior for collection tables

Gail Badner gbadner at redhat.com
Thu Jan 11 15:41:35 EST 2018


Please see https://hibernate.atlassian.net/browse/HHH-9283.

On Thu, Jan 11, 2018 at 11:43 AM, Gail Badner <gbadner at redhat.com> wrote:

> Hi Christian,
>
> I'm pretty sure this was implemented, but that it introduced a regression
> and ended up being reverted. I'll try to find the issue so you can see the
> code that was used.
>
> Regards,
> Gail
>
> On Thu, Jan 11, 2018 at 8:56 AM, Christian Beikov <
> christian.beikov at gmail.com> wrote:
>
>> 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*
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
>


More information about the hibernate-dev mailing list