Warning about embedding fields that should have encoders #2610
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.
One significant problem occurs with auto-embedded changes introduced in #2607
In cases where you have a single-value case class inside an entity it will become embedded so it is confusing why the column of the outer entity will be replaced when the inner one is missing an encoder. For example:
Since MyIdType is being treated as an embedded entity, it is automatically embedded and it's
value
field is being used as the column instead ofid
. Once the encoder for MyIdType is written this problem will go away. Need to warn the user in cases where the embedded entity has one field that this is likely a column that needs to be embedded.