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 68f672b48fe0a7fce4c9373f712ec207181c94a3 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Thu Jun 18 17:53:27 2026 -0500 Restore explicit bidirectional setup in WhereQueryOldIssueVerificationSpec Reverts simplified given-block back to original: save entities before adding to collections and set both sides of the bidirectional many-to-many explicitly. Keeps the static belongsTo = [WqBiAuthor] list-form syntax. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --- .../grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy index d73e95763c..b53b4b9286 100644 --- a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy +++ b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/WhereQueryOldIssueVerificationSpec.groovy @@ -236,11 +236,13 @@ class WhereQueryOldIssueVerificationSpec extends Specification { @Issue('https://github.com/apache/grails-core/issues/14600') def "findAllBy works with bidirectional hasMany relation"() { given: "authors with books in a bidirectional hasMany" - def author1 = new WqBiAuthor(name: "Stephen King") - def book1 = new WqBiBook(title: "IT") - def book2 = new WqBiBook(title: "The Shining") + def author1 = new WqBiAuthor(name: "Stephen King").save(flush: true) + def book1 = new WqBiBook(title: "IT").save(flush: true) + def book2 = new WqBiBook(title: "The Shining").save(flush: true) author1.addToBooks(book1) author1.addToBooks(book2) + book1.addToAuthors(author1) + book2.addToAuthors(author1) author1.save(flush: true) when: "using withCriteria to find books by author"
