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
moduledefault {
type User {
required name: str;
};
type Item {
required name: str;
};
type UserItem {
required status: str;
status_last_updated_at: datetime {
rewriteupdateusing (
if__specified__.status thendatetime_of_statement()
else__old__.status_last_updated_at
)
};
required item: Item;
user: User;
user_last_updated_at: datetime {
rewriteupdateusing (
if__specified__.user thendatetime_of_statement()
else__old__.user_last_updated_at
)
};
};
type Trade {
required sender: User;
required recipient: User;
multi sender_item_ids: uuid;
multi recipient_item_ids: uuid;
trigger on_insert afterinsertforeachdo (
for i in {
(__new__.sender, <UserItem><uuid>__new__.recipient_item_ids),
(__new__.recipient, <UserItem><uuid>__new__.sender_item_ids)
} union (update i.1set { user := i.0 })
)
};
}
InvalidReferenceError: status is not a member of tuple<__type__: std::bool, id: std::bool, item: std::bool, user: std::bool, status_last_updated_at: std::bool>
The culprit for this issue appears to be the on_insert trigger in Trade because when removed it no longer occurs. Removing status_last_updated_at will also fix the issue but is an odd behavior considering that user_last_updated_at uses the same logic. #6800 might be a similar issue, however it mentions using an extended type which I have none of.
Edit: Modifying the update clause in the trigger to include status := "test" will also fix the issue.
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
edgedb migration create
with the schema.Schema:
InvalidReferenceError: status is not a member of tuple<__type__: std::bool, id: std::bool, item: std::bool, user: std::bool, status_last_updated_at: std::bool>
The culprit for this issue appears to be the
on_insert
trigger inTrade
because when removed it no longer occurs. Removingstatus_last_updated_at
will also fix the issue but is an odd behavior considering thatuser_last_updated_at
uses the same logic. #6800 might be a similar issue, however it mentions using an extended type which I have none of.Edit: Modifying the update clause in the trigger to include
status := "test"
will also fix the issue.The text was updated successfully, but these errors were encountered: