Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation step on initialisation [DATAJDBC-592] #814

Closed
spring-projects-issues opened this issue Aug 14, 2020 · 3 comments
Closed

Add validation step on initialisation [DATAJDBC-592] #814

spring-projects-issues opened this issue Aug 14, 2020 · 3 comments
Assignees
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

benzen opened DATAJDBC-592 and commented

The documentation for mapping aggregate to sql table is not always clear and / or sufficient in regards of the diversity of the schema that could be supported.

What i would like to see in addition to this would be a validation phase during initilization.
That would validate current schema in read of what the aggregates requires.

A nice message with something like Here is your current table schema, and here is what aggreagate require, you are missing field X.

Maybe this should be implemented in the whole spring data project IDK, but in this I miss this feature


No further details from DATAJDBC-592

@spring-projects-issues
Copy link
Author

Mark Paluch commented

Thanks for raising the issue. We deliberately stayed away from schema generation and validation business as we focus on persistence functionality first. We're actively discussing some sort of schema support to e.g. generate an initial schema from the domain model without the intention of having support for schema evolution. Schema evolution is handled by tools like Flyway or Liquibase way better.

Let's keep this ticket open for future progress

@spring-projects-issues
Copy link
Author

benzen commented

In my own case, I do use flyway, and I'm quite happy with this solution beeing distinct from spring data.

The way I work, my schema at the start is pretty simple, the problem raise later when the model start to be more complexe.

Maybe, logging the expected schema at the start of the app, without any validation.
This behaviour could be available only when devtools are present.
It could also be tune down, by selecting the table/entity that we want to show in the log at the app start

@schauder
Copy link
Contributor

duplicate of #756

@schauder schauder closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@schauder schauder added the status: duplicate A duplicate of another issue label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants