It seems to me that counting the number of model instances can only be achieved through find_all() and the # operator. This is inefficient...
The Orbit tutorial uses a dedicated field in the "post" model to know how many "comment"s are associated with it, but that doesn't feel right (or even repeatable in other cases where a condition should be passed to a_model:find_all()).
Going through the current code for build_query() I don't think I can add this feature easily.
It seems to me that counting the number of model instances can only be achieved through find_all() and the # operator. This is inefficient...
The Orbit tutorial uses a dedicated field in the "post" model to know how many "comment"s are associated with it, but that doesn't feel right (or even repeatable in other cases where a condition should be passed to a_model:find_all()).
Going through the current code for build_query() I don't think I can add this feature easily.