I have Table QuoteOrder (id, user_id, foo, bar)
I also have table QuoteOrderRecurrence (id, quote_order_id, date, etc)
$q = Doctrine_Query::create()
->from('QuoteOrder qo')
->leftJoin('q.sfGuardUser sfg')
->where('qr.user_id = ?', $userId);
Is it possible to order this query by the date on QuoteOrderRecurrence.
Not all QuoteOrders have QuoteOrderRecurrence records so I want to list out those that have QuoteOrderRecurrence records first(ordered by date) followed by those without.
Simply:
Check the sqlfiddle.