You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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
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
The text was updated successfully, but these errors were encountered: