[Dbix-class] as_query() and DBIx::Class::Cursor::Cached aren't friends

Aran Deltac aran at arandeltac.com
Mon Jun 8 14:02:31 GMT 2009


> If a resultset has either group_by or collapse set by has_many prefetch
> (which is a group_by in a sense) - then we use a subquery to get the
> proper count. The as_query method was implemented on the Cursor at the
> time it was written (not sure why, I wasn't the implementer). So now
> that you have a different cursor, it doesn't return the SQL DBIC needs
> in order to construct the subquery.

Thanks for this - I modified my code to not use the group_by and all
is well for now.

Aran



More information about the DBIx-Class mailing list