You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/10/02 15:51:36 UTC

(grails-core) branch 8.1.x updated (1b80f632be -> df07fd8c11)

This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a change to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


    from 1b80f632be Merge branch '8.0.x' into 8.1.x
     add 1128a8a7ae fix: find plugin metadata in the resources directory of the Gradle build
     add d13aa33282 Merge pull request #16450 from matrei/fix/16432-config-report-plugin-resources-dir
     add fb294e42b2 Expand resource patterns when converting to Resource[]
     add d74b6f1514 Merge pull request #16469 from apache/fix/resource-array-conversion
     add 2968579291 Honor configured nullable defaults in domain unit tests
     add 1399473bd0 Cover required associations in the nullable-default unit tests
     add 7ea637dace Align the nullable-default unit test docs and specs with the testing guide
     add c89e7c17df Merge pull request #16466 from jdaugherty/fix/unit-test-default-nullable
     add e9e7740662 Restore the grails-data-hibernate5 default discriminator in Hibernate 7
     add f0ddfef924 Document keeping the 8.0.0-RC discriminator layout on Hibernate 7
     add 2b2afb80c1 Merge pull request #16471 from jdaugherty/fix/16465-h7-default-discriminator
     add dd71f8e81a Recognise constant HQL fragments and declaration-level suppression in the query safety check
     add 9ebd139cab Make the query safety check flow-sensitive beyond if/else
     add c23b19e58c Merge pull request #16463 from jdaugherty/fix/gorm-query-safety-hql-fragments
     add aa0467c3fe Make the XML-safe HTML encoder the default for grails.views.gsp.htmlcodec
     add 87b6add57b Merge pull request #16460 from apache/fix/16459-xml-html-encoder-default
     add 69974f0c8a Add nested Hibernate 7 subclasses to their direct superclass
     add f5d8958df9 Merge remote-tracking branch 'upstream/8.0.x' into fix/16464-h7-intermediate-subclasses
     add c79144dca1 Bind the Hibernate 7 subclass discriminator condition to one-to-many collections only
     add 954c889236 Cover associations typed to an intermediate Hibernate 7 subclass
     add 0a965d1087 Add a three-level inheritance hierarchy to the TCK InheritanceSpec
     add f604a6bfce Restrict MongoDB loads by id to the requested class and its subclasses
     add cc5bc9f8a8 Merge pull request #16470 from apache/fix/16464-h7-intermediate-subclasses
     add 0101bd1073 Fix guide cross references that name no section
     add 9a2291bfcf Merge pull request #16477 from matrei/docs/guide-cross-chapter-links-8.0.x
     add f15d4688dd Preserve custom identifier generators in mapping metadata
     add 7102307bec Merge pull request #16468 from apache/fix/custom-id-generator-metadata
     add dcab76df0a Split `grails.mail.overrideAddress` into separate to/from overrides.
     add 2af4f3d978 `upgrading80x.adoc`, `SKILL.md`, and `mailConfiguration.adoc` have been updated to accurately reflect the implementation in `MailMessageBuilder.groovy` and `MailConfigurationProperties`. The key changes from the original text:
     add cf187b32d5 `mailTesting.adoc` - Dropped redundant and misleading sentence "All `to`, `cc` and `bcc` addresses will be replaced by this value if set..." - Reframed language to reflect the behavior of 8.x after a user upgrades.
     add 7bbfe247c6 Merge branch '8.0.x' into fix/15933-override-to-from-addresses
     add 1f64b7cba2 Address the fourth review round of the mail override documentation
     add 9c46febfb6 Merge pull request #16452 from ruthst00/fix/15933-override-to-from-addresses
     add 9d94eca832 Share identifier generator resolution with the Hibernate mapping factories
     add 7bb6de9e56 Replace finders inheritance hierarchy with composition
     add c8d4040e4d Ignore the trailing argument map in countBy* again
     add 6b8d71c7c7 Merge branch 'refactor/finder-composition-8.0.x' into 8.0.x
     new 388cf3f8fb Merge branch '8.0.x' into 8.1.x
     new 9c759cff73 Restore the ASF license header on ListOrderByFinder
     new df07fd8c11 Ignore the trailing argument map in RxGORM countBy* too

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/grails/plugins/codecs/HTMLCodec.java       |  10 +-
 .../plugins/codecs/CodecsConfigurationSpec.groovy  |  31 +
 .../org/grails/web/codecs/HTMLCodecTests.groovy    |  64 +-
 .../grails/core/cli/ConfigReportCommand.groovy     |  17 +-
 .../config/GrailsApplicationPostProcessor.groovy   |  22 +-
 .../config/GrailsConversionServiceConverters.java  | 130 ++++
 ...GrailsEarlyPluginRegistrationPostProcessor.java |  14 +-
 .../grails/core/cli/ConfigReportCommandSpec.groovy |  37 +
 .../config/GrailsResourceConversionSpec.groovy     | 331 +++++++++
 .../orm/hibernate/cfg/HibernateMappingContext.java |  34 +-
 .../cfg/HibernateMappingContextSpec.groovy         |  42 ++
 .../binder/ConfiguredDiscriminatorBinder.java      |   8 +-
 .../binder/DefaultDiscriminatorBinder.java         |   4 +-
 .../domainbinding/binder/GrailsDomainBinder.java   |   5 +-
 .../cfg/domainbinding/binder/RootBinder.java       |   8 +-
 .../hibernate/GrailsHibernatePersistentEntity.java |   6 +-
 .../hibernate/HibernateMappingFactory.groovy       |  36 +-
 .../HibernateToManyEntityOrderByBinder.java        |  24 +-
 .../gorm/tests/HibernateMappingFactorySpec.groovy  |  41 +-
 .../IntermediateSubclassQuerySpec.groovy           | 223 ++++++
 ...ablePerHierarchyDefaultDiscriminatorSpec.groovy | 231 +++++++
 .../cfg/GrailsHibernatePersistentEntitySpec.groovy |   6 +-
 .../ConfiguredDiscriminatorBinderSpec.groovy       |  29 +-
 .../binder/DefaultDiscriminatorBinderSpec.groovy   |   2 +-
 .../binder/DiscriminatorPropertyBinderSpec.groovy  |   4 +-
 .../cfg/domainbinding/binder/RootBinderSpec.groovy |  43 +-
 .../binder/SingleTableSubclassBinderSpec.groovy    |  21 +
 .../HibernateToManyEntityOrderByBinderSpec.groovy  |  30 +-
 .../ormdsl/inheritanceStrategies.adoc              |  14 +-
 .../asciidoc/domainClasses/inheritanceInGORM.adoc  |   2 +-
 .../mongo/engine/MongoCodecEntityPersister.groovy  |   2 +
 .../mapping/mongo/engine/MongoEntityPersister.java |   5 +-
 .../datastore/mapping/mongo/query/MongoQuery.java  |  20 +-
 .../mongo/bugs/SubclassRetrieveByIdSpec.groovy     | 118 ++++
 .../mongo/config/MongoMappingContextSpec.groovy    |  21 +
 .../gorm/neo4j/GraphGormMappingFactory.groovy      |  32 -
 .../mapping/simple/SimpleMapIdentifierSpec.groovy  |  57 +-
 .../grails/datastore/gorm/finders/CountFinder.java |   7 +-
 .../datastore/gorm/finders/FinderSupport.java      |  26 +-
 .../datastore/gorm/finders/ListOrderByFinder.java  |  26 +-
 .../transform/GormQuerySafetyTransformer.java      | 755 ++++++++++++++++++---
 .../datastore/gorm/finders/CountFinderSpec.groovy  |  37 +
 .../GormQuerySafetyTransformerSpec.groovy          | 638 +++++++++++++++++
 .../grails/gorm/rx/finders/RxCountFinder.groovy    |   3 +
 .../gorm/rx/finders/RxCountFinderSpec.groovy       |  23 +-
 .../domains/{Simples.groovy => FleetCar.groovy}    |   7 +-
 .../{Practice.groovy => FleetGarage.groovy}        |   7 +-
 .../domains/{Simples.groovy => FleetSedan.groovy}  |   7 +-
 .../{Simples.groovy => FleetSportsCar.groovy}      |   7 +-
 ...OptLockVersioned.groovy => FleetVehicle.groovy} |   5 +-
 .../data/testing/tck/tests/FindByMethodSpec.groovy |  19 +
 .../data/testing/tck/tests/InheritanceSpec.groovy  |  74 +-
 .../datastore/mapping/model/MappingFactory.java    |  48 +-
 .../model/IdentityGeneratorMappingSpec.groovy      | 171 +++++
 grails-doc/src/en/guide/conf/config.adoc           |   8 +-
 grails-doc/src/en/guide/introduction/whatsNew.adoc |  30 +-
 .../src/en/guide/mail/mailConfiguration.adoc       |  19 +
 grails-doc/src/en/guide/mail/mailTesting.adoc      |  42 +-
 .../en/guide/plugins/providingBasicArtefacts.adoc  |   3 +-
 grails-doc/src/en/guide/security/codecs.adoc       |  12 +-
 .../en/guide/security/securingAgainstAttacks.adoc  |  75 +-
 .../src/en/guide/security/xssPrevention.adoc       |   1 -
 .../unitTesting/unitTestingDomainClasses.adoc      |   5 +
 .../src/en/guide/upgrading/upgrading80x.adoc       | 102 ++-
 .../DefaultInputRenderingPersistentSpec.groovy     |   2 +-
 .../formfields/DefaultInputRenderingSpec.groovy    |   2 +-
 .../org/grails/forge/feature/view/GrailsGsp.java   |   1 -
 .../grails/forge/feature/view/GrailsGspSpec.groovy |   2 +-
 .../additional-spring-configuration-metadata.json  |   3 +-
 .../mail/MailConfigurationProperties.groovy        |   2 +
 .../grails/plugins/mail/MailMessageBuilder.groovy  |  14 +-
 .../plugins/mail/MailMessageBuilderSpec.groovy     | 249 +++++++
 .../web/skeleton/grails-app/conf/application.yml   |   1 -
 .../skills/grails-8-upgrade/SKILL.md               |   7 +
 grails-testing-support-datamapping/build.gradle    |   2 +
 .../gorm/spock/DataTestSetupSpecInterceptor.groovy |   3 +-
 .../testing/gorm/CustomIdGeneratorBook.groovy      |  22 +-
 .../testing/gorm/CustomIdGeneratorSpec.groovy      |  37 +
 .../testing/gorm/NullableByDefaultSpec.groovy      |  54 ++
 .../grails/testing/gorm/NullableTestAuthor.groovy  |  20 +-
 .../grails/testing/gorm/NullableTestCommand.groovy |  19 +-
 .../grails/testing/gorm/NullableTestRecord.groovy  |  24 +-
 .../testing/gorm/RequiredByDefaultSpec.groovy      |  61 ++
 83 files changed, 4002 insertions(+), 404 deletions(-)
 create mode 100644 grails-core/src/main/groovy/grails/boot/config/GrailsConversionServiceConverters.java
 create mode 100644 grails-core/src/test/groovy/grails/boot/config/GrailsResourceConversionSpec.groovy
 create mode 100644 grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/inheritance/IntermediateSubclassQuerySpec.groovy
 create mode 100644 grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/inheritance/TablePerHierarchyDefaultDiscriminatorSpec.groovy
 create mode 100644 grails-data-mongodb/core/src/test/groovy/org/grails/datastore/gorm/mongo/bugs/SubclassRetrieveByIdSpec.groovy
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/{Simples.groovy => FleetCar.groovy} (92%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/{Practice.groovy => FleetGarage.groovy} (90%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/{Simples.groovy => FleetSedan.groovy} (92%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/{Simples.groovy => FleetSportsCar.groovy} (92%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/{OptLockVersioned.groovy => FleetVehicle.groovy} (93%)
 create mode 100644 grails-datastore-core/src/test/groovy/org/grails/datastore/mapping/model/IdentityGeneratorMappingSpec.groovy
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/WqBiBook.groovy => grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/CustomIdGeneratorBook.groovy (56%)
 create mode 100644 grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/CustomIdGeneratorSpec.groovy
 create mode 100644 grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/NullableByDefaultSpec.groovy
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/WqFoo.groovy => grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/NullableTestAuthor.groovy (58%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/WqRole.groovy => grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/NullableTestCommand.groovy (56%)
 copy grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/domains/ContactDetails.groovy => grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/NullableTestRecord.groovy (52%)
 create mode 100644 grails-testing-support-datamapping/src/test/groovy/grails/testing/gorm/RequiredByDefaultSpec.groovy


(grails-core) 01/03: Merge branch '8.0.x' into 8.1.x

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 388cf3f8fb70a10f8821ca71ad65e83f3760ec44
Merge: 1b80f632be 6b8d71c7c7
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Fri Oct 2 11:41:05 2026 -0400

    Merge branch '8.0.x' into 8.1.x

 .../org/grails/plugins/codecs/HTMLCodec.java       |  10 +-
 .../plugins/codecs/CodecsConfigurationSpec.groovy  |  31 +
 .../org/grails/web/codecs/HTMLCodecTests.groovy    |  64 +-
 .../grails/core/cli/ConfigReportCommand.groovy     |  17 +-
 .../config/GrailsApplicationPostProcessor.groovy   |  22 +-
 .../config/GrailsConversionServiceConverters.java  | 130 ++++
 ...GrailsEarlyPluginRegistrationPostProcessor.java |  14 +-
 .../grails/core/cli/ConfigReportCommandSpec.groovy |  37 +
 .../config/GrailsResourceConversionSpec.groovy     | 331 +++++++++
 .../orm/hibernate/cfg/HibernateMappingContext.java |  34 +-
 .../cfg/HibernateMappingContextSpec.groovy         |  42 ++
 .../binder/ConfiguredDiscriminatorBinder.java      |   8 +-
 .../binder/DefaultDiscriminatorBinder.java         |   4 +-
 .../domainbinding/binder/GrailsDomainBinder.java   |   5 +-
 .../cfg/domainbinding/binder/RootBinder.java       |   8 +-
 .../hibernate/GrailsHibernatePersistentEntity.java |   6 +-
 .../hibernate/HibernateMappingFactory.groovy       |  36 +-
 .../HibernateToManyEntityOrderByBinder.java        |  24 +-
 .../gorm/tests/HibernateMappingFactorySpec.groovy  |  41 +-
 .../IntermediateSubclassQuerySpec.groovy           | 223 ++++++
 ...ablePerHierarchyDefaultDiscriminatorSpec.groovy | 231 +++++++
 .../cfg/GrailsHibernatePersistentEntitySpec.groovy |   6 +-
 .../ConfiguredDiscriminatorBinderSpec.groovy       |  29 +-
 .../binder/DefaultDiscriminatorBinderSpec.groovy   |   2 +-
 .../binder/DiscriminatorPropertyBinderSpec.groovy  |   4 +-
 .../cfg/domainbinding/binder/RootBinderSpec.groovy |  43 +-
 .../binder/SingleTableSubclassBinderSpec.groovy    |  21 +
 .../HibernateToManyEntityOrderByBinderSpec.groovy  |  30 +-
 .../ormdsl/inheritanceStrategies.adoc              |  14 +-
 .../asciidoc/domainClasses/inheritanceInGORM.adoc  |   2 +-
 .../mongo/engine/MongoCodecEntityPersister.groovy  |   2 +
 .../mapping/mongo/engine/MongoEntityPersister.java |   5 +-
 .../datastore/mapping/mongo/query/MongoQuery.java  |  20 +-
 .../mongo/bugs/SubclassRetrieveByIdSpec.groovy     | 118 ++++
 .../mongo/config/MongoMappingContextSpec.groovy    |  21 +
 .../gorm/neo4j/GraphGormMappingFactory.groovy      |  32 -
 .../mapping/simple/SimpleMapIdentifierSpec.groovy  |  57 +-
 .../grails/datastore/gorm/finders/CountFinder.java |   7 +-
 .../datastore/gorm/finders/FinderSupport.java      |  26 +-
 .../transform/GormQuerySafetyTransformer.java      | 755 ++++++++++++++++++---
 .../datastore/gorm/finders/CountFinderSpec.groovy  |  37 +
 .../GormQuerySafetyTransformerSpec.groovy          | 638 +++++++++++++++++
 .../data/testing/tck/domains/FleetCar.groovy       |  24 +
 .../data/testing/tck/domains/FleetGarage.groovy    |  30 +
 .../data/testing/tck/domains/FleetSedan.groovy     |  24 +
 .../data/testing/tck/domains/FleetSportsCar.groovy |  24 +
 .../data/testing/tck/domains/FleetVehicle.groovy   |  28 +
 .../data/testing/tck/tests/FindByMethodSpec.groovy |  19 +
 .../data/testing/tck/tests/InheritanceSpec.groovy  |  74 +-
 .../datastore/mapping/model/MappingFactory.java    |  48 +-
 .../model/IdentityGeneratorMappingSpec.groovy      | 171 +++++
 grails-doc/src/en/guide/conf/config.adoc           |   8 +-
 grails-doc/src/en/guide/introduction/whatsNew.adoc |  30 +-
 .../src/en/guide/mail/mailConfiguration.adoc       |  19 +
 grails-doc/src/en/guide/mail/mailTesting.adoc      |  42 +-
 .../en/guide/plugins/providingBasicArtefacts.adoc  |   3 +-
 grails-doc/src/en/guide/security/codecs.adoc       |  12 +-
 .../en/guide/security/securingAgainstAttacks.adoc  |  75 +-
 .../src/en/guide/security/xssPrevention.adoc       |   1 -
 .../unitTesting/unitTestingDomainClasses.adoc      |   5 +
 .../src/en/guide/upgrading/upgrading80x.adoc       | 102 ++-
 .../DefaultInputRenderingPersistentSpec.groovy     |   2 +-
 .../formfields/DefaultInputRenderingSpec.groovy    |   2 +-
 .../org/grails/forge/feature/view/GrailsGsp.java   |   1 -
 .../grails/forge/feature/view/GrailsGspSpec.groovy |   2 +-
 .../additional-spring-configuration-metadata.json  |   3 +-
 .../mail/MailConfigurationProperties.groovy        |   2 +
 .../grails/plugins/mail/MailMessageBuilder.groovy  |  14 +-
 .../plugins/mail/MailMessageBuilderSpec.groovy     | 249 +++++++
 .../web/skeleton/grails-app/conf/application.yml   |   1 -
 .../skills/grails-8-upgrade/SKILL.md               |   7 +
 grails-testing-support-datamapping/build.gradle    |   2 +
 .../gorm/spock/DataTestSetupSpecInterceptor.groovy |   3 +-
 .../testing/gorm/CustomIdGeneratorBook.groovy      |  31 +
 .../testing/gorm/CustomIdGeneratorSpec.groovy      |  37 +
 .../testing/gorm/NullableByDefaultSpec.groovy      |  54 ++
 .../grails/testing/gorm/NullableTestAuthor.groovy  |  30 +
 .../grails/testing/gorm/NullableTestCommand.groovy |  25 +
 .../grails/testing/gorm/NullableTestRecord.groovy  |  34 +
 .../testing/gorm/RequiredByDefaultSpec.groovy      |  61 ++
 80 files changed, 4167 insertions(+), 319 deletions(-)



(grails-core) 03/03: Ignore the trailing argument map in RxGORM countBy* too

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit df07fd8c11e2973084b65c3bea14f952179723aa
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Fri Oct 2 11:45:53 2026 -0400

    Ignore the trailing argument map in RxGORM countBy* too
    
    RxCountFinder shares CountFinder.applyCriteriaAndCount, which no longer
    applies max, offset, sort and order from a trailing argument map
    (c8d4040e4d), so RxGORM countBy* now returns the unpaged count as well.
    RxCountFinderSpec asserted the old behaviour; it now pins that none of
    the map entries reach the query.
---
 .../grails/gorm/rx/finders/RxCountFinder.groovy    |  3 +++
 .../gorm/rx/finders/RxCountFinderSpec.groovy       | 23 ++++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/grails-datamapping-rx/src/main/groovy/org/grails/gorm/rx/finders/RxCountFinder.groovy b/grails-datamapping-rx/src/main/groovy/org/grails/gorm/rx/finders/RxCountFinder.groovy
index 31b965664a..f301dd603e 100644
--- a/grails-datamapping-rx/src/main/groovy/org/grails/gorm/rx/finders/RxCountFinder.groovy
+++ b/grails-datamapping-rx/src/main/groovy/org/grails/gorm/rx/finders/RxCountFinder.groovy
@@ -36,6 +36,9 @@ import org.grails.datastore.rx.RxDatastoreClient
  * org.grails.datastore.gorm.finders.CountFinder}, reusing that class's {@link
  * CountFinder#applyCriteriaAndCount} helper for the same independent (non-{@code getJunction})
  * And/Or criteria handling rather than duplicating it.
+ *
+ * <p>Like {@code CountFinder}, a trailing argument map is ignored, so {@code max}, {@code offset},
+ * {@code sort} and {@code order} never page or order the count.
  */
 @CompileStatic
 class RxCountFinder implements FinderMethod {
diff --git a/grails-datamapping-rx/src/test/groovy/org/grails/gorm/rx/finders/RxCountFinderSpec.groovy b/grails-datamapping-rx/src/test/groovy/org/grails/gorm/rx/finders/RxCountFinderSpec.groovy
index 76d3f50c35..c0050279a2 100644
--- a/grails-datamapping-rx/src/test/groovy/org/grails/gorm/rx/finders/RxCountFinderSpec.groovy
+++ b/grails-datamapping-rx/src/test/groovy/org/grails/gorm/rx/finders/RxCountFinderSpec.groovy
@@ -28,6 +28,7 @@ import org.grails.datastore.rx.RxDatastoreClient
 import org.springframework.core.convert.support.DefaultConversionService
 import rx.Observable
 import spock.lang.Specification
+import spock.lang.Unroll
 
 /**
  * Exercises {@link RxCountFinder} - the rx-module mirror of {@link
@@ -152,17 +153,31 @@ class RxCountFinderSpec extends Specification {
         noExceptionThrown()
     }
 
-    void "applies query arguments to the query when present"() {
+    @Unroll
+    void "ignores the trailing argument map #arguments"() {
         given:
         def finder = RxCountFinder.countBy(datastoreClient)
 
         when:
-        finder.invoke(Person, 'countByName', ['Fred', [max: 5]] as Object[])
+        Observable observable = finder.invoke(Person, 'countByName', ['Fred', arguments] as Object[]) as Observable
 
         then:
         1 * datastoreClient.createQuery(Person) >> query
-        1 * query.max(5)
-        1 * query.singleResult()
+        1 * query.singleResult() >> Observable.just(5L)
+        0 * query.max(_)
+        0 * query.offset(_)
+        0 * query.order(_)
+        0 * query.cache(_)
+        0 * query.lock(_)
+        observable.toBlocking().first() == 5L
+
+        where:
+        arguments << [
+                [max: 2, offset: 3],
+                [sort: 'name', order: 'desc'],
+                [sort: 'nope'],
+                [cache: true, lock: true]
+        ]
     }
 
     private static class Person {


(grails-core) 02/03: Restore the ASF license header on ListOrderByFinder

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdaugherty pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 9c759cff735fe0705ab050422d849e173a5cf79d
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Fri Oct 2 11:43:35 2026 -0400

    Restore the ASF license header on ListOrderByFinder
    
    #16154 replaced it with the legacy "original author or authors" header.
    The 8.0.x backport kept the ASF header, but the merge cannot carry that
    over since only 8.1.x changed the file.
---
 .../datastore/gorm/finders/ListOrderByFinder.java  | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/finders/ListOrderByFinder.java b/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/finders/ListOrderByFinder.java
index 92b5d5ce92..53fb0301f0 100644
--- a/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/finders/ListOrderByFinder.java
+++ b/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/finders/ListOrderByFinder.java
@@ -1,16 +1,20 @@
-/* Copyright (C) 2010-2025 the original author or authors.
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *    https://www.apache.org/licenses/LICENSE-2.0
  *
- *      https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
  */
 package org.grails.datastore.gorm.finders;