[Catalyst-commits] r8250 - in
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk: .
lib/CatalystX/CRUD/ModelAdapter
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Aug 21 20:46:02 BST 2008
Author: karpet
Date: 2008-08-21 20:46:02 +0100 (Thu, 21 Aug 2008)
New Revision: 8250
Modified:
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/Makefile.PL
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm
Log:
pass query as hashref instead of array ref
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/Makefile.PL 2008-08-21 19:34:10 UTC (rev 8249)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/Makefile.PL 2008-08-21 19:46:02 UTC (rev 8250)
@@ -14,6 +14,7 @@
'CatalystX::CRUD' => 0.28,
'DBIx::Class' => 0,
'Catalyst::Model::DBIC::Schema' => 0,
+ 'DBIx::Class::IntrospectableM2M' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'CatalystX-CRUD-ModelAdapter-DBIC-*' },
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm 2008-08-21 19:34:10 UTC (rev 8249)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm 2008-08-21 19:46:02 UTC (rev 8250)
@@ -97,7 +97,8 @@
sub search {
my ( $self, $controller, $c, @arg ) = @_;
my $query = shift(@arg) || $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
my @rs = $c->model( $self->model_name )
@@ -124,7 +125,8 @@
sub iterator {
my ( $self, $controller, $c, @arg ) = @_;
my $query = shift(@arg) || $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
my $rs = $c->model( $self->model_name )
@@ -141,7 +143,8 @@
sub count {
my ( $self, $controller, $c, @arg ) = @_;
my $query = shift(@arg) || $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
return $c->model( $self->model_name )
@@ -191,7 +194,8 @@
sub search_related {
my ( $self, $controller, $c, $obj, $rel, $query ) = @_;
$query ||= $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
return [ $obj->$rel->search(@q) ];
@@ -200,7 +204,8 @@
sub iterator_related {
my ( $self, $controller, $c, $obj, $rel, $query ) = @_;
$query ||= $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
return scalar $obj->$rel->search(@q);
@@ -209,7 +214,8 @@
sub count_related {
my ( $self, $controller, $c, $obj, $rel, $query ) = @_;
$query ||= $self->make_query( $controller, $c );
- my @q = ( $query->{query} );
+ my @q;
+ push( @q, { @{ $query->{query} } } );
push( @q, $controller->model_meta->{resultset_opts} )
if $controller->model_meta->{resultset_opts};
return $obj->$rel->count(@q);
More information about the Catalyst-commits
mailing list