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
I wanted to do an update to an item which has an optional field that can be undefined or is a list of strings.
The expected behavior from the following code is that if the field doesn't exist then then a new list will be created with that particular string. If the list already does exist then an item will be appended to the list. What I found is that the order of the operation matters.
In this scenario above the LIST_APPEND is never triggered even though the item already exists.
If I switch the order of LIST_APPEND and IF_NOT_EXISTS then the item gets added. However, if the item does not exist then the transaction fails because the IF_NOT_EXISTS does not get triggered first.
I wanted to do an update to an item which has an optional field that can be undefined or is a list of strings.
The expected behavior from the following code is that if the field doesn't exist then then a new list will be created with that particular string. If the list already does exist then an item will be appended to the list. What I found is that the order of the operation matters.
In this scenario above the LIST_APPEND is never triggered even though the item already exists.
If I switch the order of
LIST_APPEND
andIF_NOT_EXISTS
then the item gets added. However, if the item does not exist then the transaction fails because theIF_NOT_EXISTS
does not get triggered first.Is this behavior expected? Is it possible to achieve what I described?
Other Info
Using Typedorm 1.15.4
The text was updated successfully, but these errors were encountered: