matrei commented on code in PR #15568:
URL: https://github.com/apache/grails-core/pull/15568#discussion_r3451660582


##########
grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy:
##########
@@ -360,7 +359,7 @@ class WqBiBook implements HibernateEntity<WqBiBook> {
     String title
 
     static hasMany = [authors: WqBiAuthor]
-    static belongsTo = WqBiAuthor
+    static belongsTo = [WqBiAuthor]

Review Comment:
   > The bare-class form static belongsTo = WqBiAuthor is ambiguous in GORM — 
it can be misinterpreted as a single-entry map literal.
   
   How can it be misinterpreted, and by who/what? Why change this test, is this 
notation no longer allowed?
   https://grails.apache.org/docs/latest/ref/Domain%20Classes/belongsTo.html
   
   > This matches the intended semantics and eliminates a Hibernate 7 mapping 
warning about ambiguous belongsTo declarations.
   
   This is in `grails-data-hibernate5`.



-- 
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]

Reply via email to