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

Migration should overwrite entity state instead of merging new state into old one #1403

Closed
dmitrykuzmin opened this issue Oct 21, 2021 · 1 comment
Labels

Comments

@dmitrykuzmin
Copy link
Contributor

dmitrykuzmin commented Oct 21, 2021

Migration allows to update one or more entities in the repository by applying the user-supplied state mapping.

At the moment, the newState returned as the result of the mapping is propagated to the entity using mergeFrom(...) call on the old state. This causes repeated and message-type fields to be overwritten only partially.

The Migration logic should be changed so that the newState completely overwrites the old one within the migration transaction.

See this line.

@armiol
Copy link
Contributor

armiol commented Nov 16, 2021

Addressed in #1405 and #1419.

@armiol armiol closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants