Change query typing to respect where null, or where not null
Hello!
I am wondering if there is a solution for my current case that would greatly improve my code. I have several tables that have 2 states: in
I would love to be able to do something like this:
and have the typing of
I am wondering if there is a solution for my current case that would greatly improve my code. I have several tables that have 2 states: in
reservation, or not in reservation. When a row is in reservation, it does not have the links (or relationships) to other tables as it does when not in reservation. For this reason, multiple relationship must be nullable, see screenshot for an example.I would love to be able to do something like this:
and have the typing of
payments to have its key relation not nullable because I have validated in the where that it cannot be null. So the typing would end up to be :