Finder fetch(): I need to apply HAVING on the query or other method

Hello all!
I'm using the XF:User finder to select some users.
XF:User has a TO_ONE relation, let's say it Orders (db table xf_sc_orders).

I need do a fetch() with HAVING COUNT(xf_sc_orders.order_id) <= 1

How could I achieve it? Does Finder supports HAVING?
If no, any hint how could I extend only the XF:User finder to achieve this query?

I need to select those users with the most efficient method.

Let me know also if I could make it via modifying the...

Read more

Читать далее...
 
Активность
Пока что здесь никого нет
Назад
Верх Низ