InternalServerError
when trying to coalesce with an existing link property value
#7356
Labels
InternalServerError
when trying to coalesce with an existing link property value
#7356
Steps to Reproduce:
insert Person {name := 'Doc'};
)insert Queue {people := (select Person {@position := [1]})};
)update Queue set {people += (select .people {@position := (@position ?? []) ++ [2]} filter .name = 'Doc')};
Schema:
A single person may have multiple positions in a queue. Imagine a presale for event tickets that allows each person to purchase multiple tickets, but they must obtain a new position in the queue for each ticket. (I never said it was a well-designed event presale 😅) The goal here is to come up with a query that, without knowing whether a given person is already in the queue, could either add them to it with the desired position or add the desired new position to their existing
position
link property array. My idea was to coalesce the existing link property value with an empty set and concatenate an array with the new value with the result. That ended in an ISE:The text was updated successfully, but these errors were encountered: