You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jdaugherty (via GitHub)" <gi...@apache.org> on 2026/06/02 13:06:01 UTC
Re: [PR] Fix bindData binding id/version when domain extends a @DirtyCheck base (#15681) [grails-core]
jdaugherty commented on code in PR #15699:
URL: https://github.com/apache/grails-core/pull/15699#discussion_r3341376479
##########
grails-web-databinding/src/main/groovy/org/grails/web/databinding/DefaultASTDatabindingHelper.java:
##########
@@ -145,9 +145,20 @@ private Set<String> getPropertyNamesToIncludeInWhiteList(final SourceUnit source
final Set<String> propertyNamesToIncludeInWhiteList = new HashSet<>();
final Set<String> unbindablePropertyNames = new HashSet<>();
final Set<String> bindablePropertyNames = new HashSet<>();
+ final boolean isDomainClass = GrailsASTUtils.isDomainClass(classNode, sourceUnit);
if (!classNode.getSuperClass().equals(new ClassNode(Object.class))) {
final Set<String> parentClassPropertyNames = getPropertyNamesToIncludeInWhiteListForParentClass(sourceUnit, classNode.getSuperClass());
- bindablePropertyNames.addAll(parentClassPropertyNames);
+ for (final String parentPropertyName : parentClassPropertyNames) {
+ // The id, version, dateCreated and lastUpdated properties of a domain class are never bound by default.
Review Comment:
We should simplify the comment or just remove it. I think the code is self-explanatory
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org