File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
hibernate-core/src/main/java/org/hibernate/jpa/event/internal Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1717import org .hibernate .internal .util .ReflectHelper ;
1818import org .hibernate .jpa .event .spi .CallbackDefinition ;
1919import org .hibernate .jpa .event .spi .CallbackType ;
20+ import org .hibernate .mapping .Component ;
2021import org .hibernate .mapping .PersistentClass ;
2122import org .hibernate .mapping .Property ;
2223import org .hibernate .models .spi .AnnotationDescriptor ;
@@ -282,7 +283,9 @@ public static void resolveLifecycleCallbacks(
282283 // code was added by HHH-12326
283284 collector .addSecondPass ( persistentClasses -> {
284285 for ( Property property : persistentClass .getDeclaredProperties () ) {
285- if ( property .isComposite () ) {
286+ if ( property .getValue () instanceof Component component
287+ // embedded components don't have their own class, so no need to check callbacks (see HHH-19671)
288+ && !component .isEmbedded () ) {
286289 try {
287290 final Class <?> mappedClass = persistentClass .getMappedClass ();
288291 for ( CallbackType type : CallbackType .values () ) {
You can’t perform that action at this time.
0 commit comments