Hi,
So it appears that Query.count() returns a row count for that
particular query, which len(Query.all()) obviously returns an object
count.

In the case of a join where several rows are automagically folded into
a single object, this count can differ.

Is there a shortcut for the case where I want to know the object
count, but don't want to retrieve all the objects from the database to
do so?

Failing that, what's the best practice for a workaround - I've been
fiddling with distinct() and group_by() but I'm sure someone must have
hit this too!

Thanks,
James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to