Skip to content

Commit

Permalink
Revert "HHH-15072 Don't enhance records and skip owner tracking for e…
Browse files Browse the repository at this point in the history
…mbeddable record fields"

This reverts commit d2cca54.
  • Loading branch information
beikov committed Sep 2, 2022
1 parent 09b19c7 commit 0cf2420
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ private DynamicType.Builder<?> doEnhance(DynamicType.Builder<?> builder, TypeDes
log.debugf( "Skipping enhancement of [%s]: it's an interface", managedCtClass.getName() );
return null;
}
// can't effectively enhance records
if ( managedCtClass.isRecord() ) {
log.debugf( "Skipping enhancement of [%s]: it's a record", managedCtClass.getName() );
return null;
}
// skip already enhanced classes
if ( alreadyEnhanced( managedCtClass ) ) {
log.debugf( "Skipping enhancement of [%s]: already enhanced", managedCtClass.getName() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ else if ( !persistentField.hasAnnotation( Id.class )
}

if ( enhancementContext.isCompositeClass( persistentField.getType().asErasure() )
&& persistentField.hasAnnotation( Embedded.class )
// Don't do composite owner tracking for records
&& !persistentField.getType().isRecord() ) {
&& persistentField.hasAnnotation( Embedded.class ) ) {

// HHH-13759 - Call getter on superclass if field is not visible
// An embedded field won't be visible if declared private in a superclass
Expand Down

This file was deleted.

0 comments on commit 0cf2420

Please sign in to comment.