Branch: refs/heads/main
Home:
https://github.com/hibernate/hibernate-orm
Commit: ad8fe58cf12b2c615759092bae49f8ebf974d7c2
https://github.com/hibernate/hibernate-orm/commit/ad8fe58cf12b2c615759092...
Author: ettavolt <ettavolt(a)gmail.com>
Date: 2024-05-14 (Tue, 14 May 2024)
Changed paths:
M
hibernate-core/src/main/java/org/hibernate/boot/model/internal/CollectionBinder.java
A
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/collectionelement/OnDeleteCascadeToElementCollectionTest.java
Log Message:
-----------
HHH-4301 Allow OnDelete on ElementCollection.
CollectionBinder#oneToMany is only for association, not for element collection:
#scheduleSecondPass expects MappedBy, which is only available for associations;
#detectMappedByProblem really wants to check association, because only for it JPA requires
join table by default;
#noAssociationTable cares about association again, because otherwise element won't be
a persistent class;
#bindManyToManySecondPass:
#logManyToManySecondPass uses oneToMany only to differentiate between different
collection of entities;
#bindManyToManyInverseForeignKey is run for association only.
Commit: 1b67ebee6052ec536ba925f2598f83e367559b50
https://github.com/hibernate/hibernate-orm/commit/1b67ebee6052ec536ba925f...
Author: Gavin King <gavin(a)hibernate.org>
Date: 2024-05-14 (Tue, 14 May 2024)
Changed paths:
M
hibernate-core/src/main/java/org/hibernate/action/internal/QueuedOperationCollectionAction.java
M
hibernate-core/src/main/java/org/hibernate/boot/model/internal/CollectionBinder.java
M hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java
M
hibernate-core/src/main/java/org/hibernate/event/internal/AbstractFlushingEventListener.java
M
hibernate-core/src/main/java/org/hibernate/event/internal/DefaultDeleteEventListener.java
M hibernate-core/src/main/java/org/hibernate/event/internal/WrapVisitor.java
M
hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
M
hibernate-core/src/main/java/org/hibernate/persister/collection/BasicCollectionPersister.java
M
hibernate-core/src/main/java/org/hibernate/persister/collection/OneToManyPersister.java
M
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/collectionelement/OnDeleteCascadeToElementCollectionTest.java
Log Message:
-----------
HHH-4301 eliminate unnecessary DELETE for collections with @OnDelete(CASCADE)
This change works for @ElementCollection and @ManyToMany
In future we could do a similar thing for @OneToMany and SET_NULL
Signed-off-by: Gavin King <gavin(a)hibernate.org>
Compare:
https://github.com/hibernate/hibernate-orm/compare/327399e801ea...1b67ebe...
To unsubscribe from these emails, change your notification settings at
https://github.com/hibernate/hibernate-orm/settings/notifications