[Jifty-commit] r5856 - in Jifty-DBI/trunk: lib/Jifty lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Wed Sep 17 18:25:30 EDT 2008
Author: alexmv
Date: Wed Sep 17 18:25:29 2008
New Revision: 5856
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI.pm
Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
r37358 at kohr-ah: chmrr | 2008-09-17 18:25:12 -0400
* When we have group_by, the first column may not be enough to distinctify the rows. But since they're grouped, they're all distinct by definition.
Modified: Jifty-DBI/trunk/lib/Jifty/DBI.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI.pm Wed Sep 17 18:25:29 2008
@@ -2,7 +2,7 @@
use warnings;
use strict;
-$Jifty::DBI::VERSION = '0.52';
+$Jifty::DBI::VERSION = '0.53';
=head1 NAME
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm Wed Sep 17 18:25:29 2008
@@ -219,8 +219,10 @@
);
my @order;
+ my $i = 1;
while ( my $base_row = $records->fetchrow_hashref() ) {
my $main_pkey = $base_row->{ $names[0] };
+ $main_pkey = 'unique-'.$i++ if $self->{group_by};
push @order, $main_pkey
unless ( $order[0] && $order[-1] eq $main_pkey );
@@ -2108,7 +2110,8 @@
=head2 columns LIST
-Specify that we want to load only the columns in LIST, which is a
+Specify that we want to load only the columns in LIST, which should be
+a list of column names.
=cut
More information about the Jifty-commit
mailing list