apache / apache/grails-core

save(validate: false) still validates on flush

Open
#15,276 10 comments 0 reactions 1 assignee Claimed by @jdaugherty View on GitHub
design-required relates-to: gorm relates-to: grails-data-hibernate5
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.