Skip to content

save(validate: false) still validates on flush #15276

@docbee-fschrader

Description

@docbee-fschrader

Expected Behavior

It should be possible to save a domain that has fields that are invalid based on grails validation by setting validate:false

Actual Behaviour

The validation is triggered on flush and the domain isn't persisted

Steps To Reproduce

I created an example project (based on the demo project generated on the grails website) with an integration test to demonstrate the issue. To run the test, create a postgresql database testDb for user test with password test.

Environment Information

  • Grails 7.0.4
  • Java 17.0.15
  • PostgreSQL 17

Example Application

https://github.com/docbee-fschrader/grails-7-validation-bug

Version

7.0.4

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions