Hi!
I’ve got orders_for_materials
and warehouse_materials
after delivery of material I create record in warehouse_materials
which is linked to orders - warehouse
have order_id
field.
Now I want to select orders with no materials (records), but orders are linked with few other tables, `material_kinds’ for example and I want this data to be fetched.
cake v3.1
ps. I found this mysql - Select * where association is empty in SQL? - Stack Overflow but I wonder if there is more cake-way ?
Also I wondering about notMatching()
but I don’t know how to construct condition
for this case.