[odb-users] Self join WHERE value IS NULL
Boris Kolpackov
boris at codesynthesis.com
Mon Aug 22 12:36:32 EDT 2016
Hi Tom,
Tom Stoffer <tom at touchsurgery.com> writes:
> #pragma db view query("SELECT employee.name FROM employee LEFT
> JOIN employee_down ON employee.name = employee_down.value WHERE
> employee_down.value IS NULL")
If you need to test container entries for NULL, then this is the only
way since there is no support for using container elements in query
conditions, yet.
In this particular case it is not clear what the benefit of having
NULL pointers in the container when you could just remove the entry
altogether. In this case I think you would have been able to test
this (i.e., no related objects) using a non-native view.
Boris
More information about the odb-users
mailing list