Revision history for DBIx::Class
+0.05004 2006-02-13 20:59:00
- allow specification of related columns via cols attr when primary
+ - Fix count for group_by as scalar
keys of the related table are not fetched
- add horrific fix to make Oracle's retarded limit syntax work
+ - Remove Carp require
0.05003 2006-02-08 17:50:20
- add component_class accessors and use them for *_class
# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
-$VERSION = '0.05003';
+$VERSION = '0.05004';
sub MODIFY_CODE_ATTRIBUTES {
my ($class,$code,@attrs) = @_;
unless (@_) {
my $caller = caller;
- require Carp;
croak("'$caller' cannot access the value of '$field' on ".
"objects of class '$class'");
}
my $group_by;
my $select = { 'count' => '*' };
if( $group_by = delete $self->{attrs}{group_by} ) {
- my @distinct = @$group_by;
+ my @distinct = (ref $group_by ? @$group_by : ($group_by));
# todo: try CONCAT for multi-column pk
my @pk = $self->result_source->primary_columns;
if( scalar(@pk) == 1 ) {
$self->debugfh->print("$sql: @debug_bind\n");
}
my $sth = $self->sth($sql,$op);
+ croak "no sth generated via sql: $sql" unless $sth;
@bind = map { ref $_ ? ''.$_ : $_ } @bind; # stringify args
my $rv;
if ($sth) {