edgedb
edgedb copied to clipboard
GROUP - Can't compile ref to visible binding
- EdgeDB Version:
2.1.0-dev.827+ea32987
- OS Version:
20.04.1-Ubuntu
Using example database, the query:
with grouped := (group Movie by .release_year)
for item in grouped union (select item.elements { title } )
gives
InternalServerError: Can't compile ref to visible binding ns~1@@(__derived__::g~1)
Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
note that if you simply remove the reference to title
, it works.
with grouped := (group Movie by .release_year)
for item in grouped union (select item.elements )
Thanks for the report!
As a workaround, don't bind the group
result to a variable, just stick it into the select.
That's what I ended up doing! I wanted to create a free object with some other properties but will omit that for now :)
with grouped := (for x in Movie union { multi elements := x })
for item in grouped union (select item.elements { title } );
fails in a similar way that hopefully shares the root cause.