Copilot commented on code in PR #15768:
URL: https://github.com/apache/grails-core/pull/15768#discussion_r3476609024
##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy:
##########
@@ -275,11 +275,11 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
doListInternal(query, namedParams, [], args, false)
}
- D findWithNativeSql(CharSequence sql, Map args = Collections.emptyMap()) {
+ D findWithSql(CharSequence sql, Map args = Collections.emptyMap()) {
doSingleInternal(sql, [:], [], args, true) as D
}
- List<D> findAllWithNativeSql(CharSequence query, Map args =
Collections.emptyMap()) {
+ List<D> findAllWithSql(CharSequence query, Map args =
Collections.emptyMap()) {
doListInternal(query, [:], [], args, true)
}
Review Comment:
Renaming/removing `findWithNativeSql` / `findAllWithNativeSql` here is a
source/binary breaking change for any callers that used
`HibernateGormStaticApi` directly, and it also contradicts the current
Hibernate7 docs/upgrade notes which document the *NativeSql* method names as
the preferred public API (e.g.
`grails-data-hibernate7/docs/.../upgradeNotes.adoc:59` and
`querying/nativeSql.adoc`). To avoid breaking external integrations, keep the
old method names as delegating aliases (ideally marked `@Deprecated`) while
introducing/using the `findWithSql` / `findAllWithSql` names internally.
--
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]