Open tetchel opened 2 years ago
Hmm. I guess the idea of selectExactlyOne
is that you use it when you absolutely know that there is one matching row — e.g. because you're joining on a NOT NULL foreign key.
That said, you're right that this is unexpected and inconsistent behaviour, and that qualifies it as a great big bug. I'll see if I can fix it!
Ha, I just experienced this! you think you absolutely know there's one matching row but RLS makes that uncertain :)
yeah, for us we'd removed a NOT NULL
from a FK column and did not think to update all the laterals using that column as a join.
I've created a repository with a repro and details here: https://github.com/tetchel/zap-lateral-bug