From: Aaron Trevena Date: Thu, 19 Apr 2007 19:38:34 +0000 (+0000) Subject: fix to bug raised by mst with FromCGI X-Git-Tag: 2.12~12 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=fe502daa5fcf39d01c38823dbf169199d1a50e99;p=maypole.git fix to bug raised by mst with FromCGI git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@562 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Maypole/Model/CDBI/Base.pm b/lib/Maypole/Model/CDBI/Base.pm index 2434284..6ecc213 100644 --- a/lib/Maypole/Model/CDBI/Base.pm +++ b/lib/Maypole/Model/CDBI/Base.pm @@ -125,7 +125,7 @@ sub _do_update_or_create { # update or create if ($obj) { # We have something to edit - eval { $obj->update_from_cgi( $r => { + eval { $obj->update_from_cgi( $h => { required => $required_cols, ignore => $ignored_cols, }); @@ -134,7 +134,7 @@ sub _do_update_or_create { $fatal = $@; } else { eval { - $obj = $self->create_from_cgi( $r => { + $obj = $self->create_from_cgi( $h => { required => $required_cols, ignore => $ignored_cols, } ); @@ -231,6 +231,9 @@ sub do_search : Exported { if ( !%values ) { return $self->list($r) } my $order = $self->order($r); $self = $self->do_pager($r); + + # FIXME: use pager info to get slice of iterator instead of all the objects as array + $r->objects( [ $self->search_where( @@ -756,7 +759,7 @@ sub get_classmetadata { =head1 SEE ALSO -L, L. +L, L. =head1 AUTHOR