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 17
17
import org .hibernate .internal .util .ReflectHelper ;
18
18
import org .hibernate .jpa .event .spi .CallbackDefinition ;
19
19
import org .hibernate .jpa .event .spi .CallbackType ;
20
+ import org .hibernate .mapping .Component ;
20
21
import org .hibernate .mapping .PersistentClass ;
21
22
import org .hibernate .mapping .Property ;
22
23
import org .hibernate .models .spi .AnnotationDescriptor ;
@@ -282,7 +283,9 @@ public static void resolveLifecycleCallbacks(
282
283
// code was added by HHH-12326
283
284
collector .addSecondPass ( persistentClasses -> {
284
285
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 () ) {
286
289
try {
287
290
final Class <?> mappedClass = persistentClass .getMappedClass ();
288
291
for ( CallbackType type : CallbackType .values () ) {
You can’t perform that action at this time.
0 commit comments