Hi,

I found a very interesting solution for the Bulk id multi-table strategy
for those cases when the DB management policy forbids creating Temporary
Tables.
This situation is documented in this Forum post:

https://forum.hibernate.org/viewtopic.php?f=1&t=1043080&p=2489096#p2489096

After doing some investigation, I found this project on GitHub:

https://github.com/epiresdasilva/cte-multi-table-bulk-id-stategy

After migrating it for Hibernate 5.x, I tested it and it works very nice,
generating queries like this:

with HT_announecement ( id ) as (
values
    (?), (?) )
delete
    from
        announcement
    where
        (
            id
        ) IN (
            select
                id
            from
                HT_announecement
        )

I think we should take this idea and write and come up with a built-in
strategy using CTE.

What do you think?

Vlad
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to