update issue with virtual fields #17245
Unanswered
hdrodel
asked this question in
Help & Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a field called "description" it contains a JSON of a multi language string like this:
{"de":"Katze","en":"cat","fr":"chat"}
i have virtual fields like this:
descriptionDE, descriptionFR, descriptionEN etc.
this seems to be working fine except if i use
sequelize.model.Animal.update
For some reasons this will only work if i change all languages at the same time. If i just change one of the virtual fields, i will end up with only the changed one. I believe that in the update function, the this.get('description') will fetch the defaultValue of the description field instead, that is set to be
{"de":"","fr":"","en":""}
Does anybody know what's happening here?
Beta Was this translation helpful? Give feedback.
All reactions