Skip to content

Commit

Permalink
Fix Panache bytecode enhancement for @embeddable records
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Dec 1, 2023
1 parent 79e3b19 commit 1b426fc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ private EntityModel createEntityModel(ClassInfo classInfo) {
// so we need to be careful when we enhance private fields,
// because the corresponding `$_hibernate_{read/write}_*()` methods
// will only be generated for classes mapped through *annotations*.
boolean willBeEnhancedByHibernateOrm = classInfo.hasAnnotation(DOTNAME_ENTITY)
boolean isManaged = classInfo.hasAnnotation(DOTNAME_ENTITY)
|| classInfo.hasAnnotation(DOTNAME_MAPPED_SUPERCLASS)
|| classInfo.hasAnnotation(DOTNAME_EMBEDDABLE);
boolean willBeEnhancedByHibernateOrm = isManaged
// Records are immutable, thus never enhanced
&& !classInfo.isRecord();
for (FieldInfo fieldInfo : classInfo.fields()) {
String name = fieldInfo.name();
if (!Modifier.isStatic(fieldInfo.flags())
Expand Down

0 comments on commit 1b426fc

Please sign in to comment.