Skip to content

Commit

Permalink
Fix Panache bytecode enhancement for @embeddable records
Browse files Browse the repository at this point in the history
(cherry picked from commit 1b426fc)
  • Loading branch information
yrodiere authored and gsmet committed Dec 1, 2023
1 parent cdbc6d6 commit 78a823c
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 78a823c

Please sign in to comment.