keplerproject/orbit — Issue #5: Impossible to retrieve number of rows in model table
Author: remram44
Created: 2011-10-17 22:29:08+00:00
State: open

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.