bito-code-review[bot] commented on PR #16028:
URL: https://github.com/apache/grails-core/pull/16028#issuecomment-5044323368
<!-- Bito Reply -->
The change from `resolveTableName` to `resolveColumnName` in
`HibernateToManyProperty.java` is intended to ensure that property names are
processed using the naming strategy's column naming rules rather than table
naming rules. In the context of the modified code, `getName()` refers to a
property name, which should be mapped to a column name in the database schema.
Using `resolveTableName` for a property name was likely incorrect because
property-to-column mapping logic can differ from entity-to-table mapping logic,
especially when custom naming strategies are involved.
**grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/hibernate/HibernateToManyProperty.java**
```
var clazz = isBasic() ?
namingStrategy.resolveColumnName(referencedType.getName()) :
resolveAssociatedEntityTableName(namingStrategy);
var prop = namingStrategy.resolveColumnName(getName());
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]