[Dbix-class] Iteration with ->next versus using ->all, and count

Peter Rabbitson rabbit+dbic at rabbit.us
Wed Sep 1 12:50:15 GMT 2010


Adam Sjøgren wrote:
> Last week I upgraded to Ubuntu 10.04, and went from DBIx::Class 0.08107
> to 0.08115.
> 
> In an application I noticed a change in iterating using ->next, compared
> to calling ->all (on a resultset obtained with search_related), that I
> find a little odd: One returns one record, the other returns three.
> 
> Here is an attempt at a minimal example (using Postgres and DBIx::Class
> from git (93d0eb5)):

You say you used the latest version from git, yet I don't see the results
below, only 0.08107 and 0.08115 (both are pretty old). Additionally there
is this:

http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=blob;f=Changes;h=e9e8654b02c00f39af9b4b07bacb9fca050c7e5f;hb=HEAD#l214

I'd recommend upgrading to the latest official CPAN version (0.08123) and
see if this helps. If you need to backport the particular fix to 0.08115
it is located here:

http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=commitdiff;h=4f9eebe193524afdbe7e4089cd23db666600f3c6;hp=37cb0de173eed31c34a583b1404fcef6f41da0ce

Cheers




More information about the DBIx-Class mailing list