matrei opened a new pull request, #16507:
URL: https://github.com/apache/grails-core/pull/16507

   ## Description
   
   `CrudOperationsSpec` in `grails-datamapping-tck` has had an `@IgnoreRest` on 
`Test basic CRUD operations` since d1184d91af. Spock then runs only that 
feature, so these four have been skipped on every datastore that runs the TCK:
   
   - `Test get using a string-based key`
   - `Test get returns null of non-existent entity`
   - `Test save method that takes a map`
   - `Test failOnError`
   
   This removes the `@IgnoreRest` and its import.
   
   `Test failOnError` expected `save(failOnError: true)` to fail for a 
`TestEntity` without a `name`. That relied on properties being required by 
default, which is no longer true in Grails 8 (upgrade guide, "GORM Properties 
Are Nullable by Default"). The test now gives the entity an empty name, which 
fails the `blank: false` constraint of `TestEntity` on both 7.0.x and 8.0.x. 
The name is set after the entity is constructed, because data binding turns an 
empty string into `null`.
   
   ### Tests
   
   `CrudOperationsSpec` runs all five features and passes:
   
   - on 7.0.x: the simple datastore (`grails-datamapping-core-test`), Hibernate 
5 and MongoDB
   - on 8.0.x, with the same change applied: the simple datastore, Hibernate 5, 
Hibernate 7 and MongoDB
   


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