I'm working on a system with several subscribers (user_id) having multiple customers and vendors (inheriting the 'Person' class). I need to display the number of customers & vendors (group totals for the child tables) for each subscriber. How can I get a these group totals using DQL?
Person:
columns:
user_id: { type: integer }
name: { type: string(80) }
//...
Customer:
inheritance:
type: concrete
extends: Person
columns:
//...
Vendor:
inheritance:
type: concrete
extends: Person
columns:
vendor_type: { type: string(80), notnull: true }
terms_id: { type: integer }
//...