You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by bo...@apache.org on 2026/02/19 21:54:13 UTC
(grails-core) 10/25: Fix getTypeName fallback to avoid breaking special Enum handling
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 4a807aa51250daed73f8498389f231b80577916b
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Wed Feb 18 21:53:41 2026 -0600
Fix getTypeName fallback to avoid breaking special Enum handling
---
.../org/grails/orm/hibernate/cfg/GrailsHibernatePersistentProperty.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernatePersistentProperty.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernatePersistentProperty.java
index 234c0305e0..7d2dd5958a 100644
--- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernatePersistentProperty.java
+++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernatePersistentProperty.java
@@ -94,7 +94,7 @@ public interface GrailsHibernatePersistentProperty extends PersistentProperty<Pr
.map(typeObj -> typeObj instanceof Class<?> clazz ? clazz.getName() : typeObj.toString())
.orElseGet(() -> mapping != null ? mapping.getTypeName(propertyType) : null);
- if (typeName == null && propertyType != null && getHibernateAssociatedEntity() == null) {
+ if (typeName == null && propertyType != null && getHibernateAssociatedEntity() == null && !propertyType.isEnum()) {
return propertyType.getName();
}
return typeName;