293011 upgrade maven depedency postgresql from 42.6.0 to 42.7.8#158
Open
ChristosKalaitzis wants to merge 2 commits intoSandboxEnvfrom
Open
Conversation
…schema `dataset_0` and removed explicit default schema from entities
Author
|
This is a much needed change to correctly resolve tenants while booting spring. I removed the default schema at entities and put a default schema at |
| public static String getTenantName() { | ||
| Map<String, Object> properties = thread.get(); | ||
| String datasetName = ""; | ||
| String datasetName = "dataset_0"; // default schema |
Author
There was a problem hiding this comment.
This is essential to resolve a schema before startup
| tableValue.setIdTableSchema(schemaId); | ||
| tableValue = tableRepository.save(tableValue); | ||
| } | ||
| LOG.info("[CHRIS] TableValue: {}", tableValue); |
Author
There was a problem hiding this comment.
I have to remove the logs starting with [CHRIS]
Also not sure if this part of the code is needed currently, I have to check it
Contributor
|
You can proceed with the merge |
| @Id | ||
| @GenericGenerator(name = "record_sequence_generator", | ||
| strategy = "org.eea.dataset.persistence.data.sequence.RecordValueIdGenerator") | ||
| @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "record_sequence_generator") |
Author
There was a problem hiding this comment.
this should not be removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the bump up from version
42.6.0to42.7.8for maven dependencypostgresql.There are active issues that put the whole project at risk, because there is a more strict handling of resolving tenants, entities have to assign a default schema and also it enforces the actual foreign-key rules defined in the database to save an object, you cannot just save a child with assigned parent if parent is a new object and not already existing to database.
Next changes should abort this default schema, mutate the tenant resolver classes and have extra configuration about tenants if needed. This is a complex task and hard to test across platform.