Hi,
I'd like to be able to create a IF NOT EXISTS subquery, however the where() method always expects a column to be given, so something like
Model_Xyz::find()
->where(null, 'not exists', DB::query(SELECT * FROM foo))
->get()
will always generate WHERE `t0`.`` NOT EXISTS (SELECT * FROM `foo`), which of course is invalid SQL. If only there was a way to allow where() to not require a column...
What would be the best thing to do here? Extend the Orm query model and write my own where_exists() function or similar?
Thanks!