how to get the count of child records without get objects
If I get a parent record, how to get the count of child records without get all children objects, because it's to slow. I only want get the count in one query.
QxOrm : ORM (Object Relational Mapping) C++ library - QxEntityEditor : graphic editor for QxOrm library
http://www.qxorm.com/forum/phpbb/
MyParent parent; parent.setId(50);
QSqlError daoError = qx::dao::fetch_by_id(parent);
long lChildCount = qx::dao::count<MyChild>(qx_query().where("parent_id").isEqualTo(parent.getId()));