[Catalyst-commits] r9763 - in Catalyst-Controller-DBIC-API/1.003: .
trunk trunk/lib/Catalyst/Controller/DBIC
trunk/lib/Catalyst/Controller/DBIC/API trunk/t/rpc
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Mon Apr 20 17:59:53 GMT 2009
Author: lukes
Date: 2009-04-20 18:59:52 +0100 (Mon, 20 Apr 2009)
New Revision: 9763
Modified:
Catalyst-Controller-DBIC-API/1.003/
Catalyst-Controller-DBIC-API/1.003/trunk/Changes
Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API.pm
Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm
Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
Catalyst-Controller-DBIC-API/1.003/trunk/t/rpc/list.t
Log:
r234 at luke-mbp (orig r9619): lukes | 2009-03-30 16:56:32 +0100
added extra test case to check searches on relation with col of same name okay
r235 at luke-mbp (orig r9620): lukes | 2009-03-30 17:15:51 +0100
corrected same fk/rel test descriptions
r424 at luke-mbp (orig r9762): lukes | 2009-04-20 18:46:25 +0100
minor change to make this module work with Catalyst::Runtime 5.80
Property changes on: Catalyst-Controller-DBIC-API/1.003
___________________________________________________________________
Name: svk:merge
+ 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.001:9528
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.002:9762
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/Changes
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/Changes 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/Changes 2009-04-20 17:59:52 UTC (rev 9763)
@@ -1,5 +1,8 @@
Revision history for Catalyst-Controller-DBIC-API
+1.002001
+- Minor change to make this module work with Catalyst::Runtime 5.80
+
1.002000
- Better error handing when unable to parse search arg
- Added setup_dbic_args_method config option
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/Base.pm 2009-04-20 17:59:52 UTC (rev 9763)
@@ -27,6 +27,16 @@
rs_stash_key => 'class_rs'
);
+sub begin :Private {
+ my ($self, $c) = @_;
+
+ $c->forward('deserialize');
+ if ($c->req->data) {
+ $c->req->params($c->req->data);
+ }
+ $self->NEXT::begin($c);
+}
+
sub setup :Chained('specify.in.subclass.config') :CaptureArgs(0) :PathPart('specify.in.subclass.config') {
my ($self, $c) = @_;
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2009-04-20 17:59:52 UTC (rev 9763)
@@ -74,14 +74,6 @@
=cut
-sub begin :Private {
- my ($self, $c) = @_;
-
- $c->forward('deserialize');
- $c->req->params($c->req->data);
- $self->NEXT::begin($c);
-}
-
# from Catalyst::Action::Serialize
sub deserialize :ActionClass('Deserialize') {
my ($self, $c) = @_;
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2009-04-20 17:59:52 UTC (rev 9763)
@@ -86,14 +86,6 @@
=cut
-sub begin :Private {
- my ($self, $c) = @_;
-
- $c->forward('deserialize');
- $c->req->params($c->req->data);
- $self->NEXT::begin($c);
-}
-
# from Catalyst::Action::Serialize
sub deserialize :ActionClass('Deserialize') {
my ($self, $c) = @_;
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API.pm 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/lib/Catalyst/Controller/DBIC/API.pm 2009-04-20 17:59:52 UTC (rev 9763)
@@ -9,7 +9,7 @@
=cut
-our $VERSION = '1.002000';
+our $VERSION = '1.002001';
=head1 NAME
Modified: Catalyst-Controller-DBIC-API/1.003/trunk/t/rpc/list.t
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/trunk/t/rpc/list.t 2009-04-20 17:46:25 UTC (rev 9762)
+++ Catalyst-Controller-DBIC-API/1.003/trunk/t/rpc/list.t 2009-04-20 17:59:52 UTC (rev 9763)
@@ -60,7 +60,6 @@
is_deeply( { list => \@expected_response, success => 'true' }, $response, 'correct data returned for complex query' );
}
-exit;
{
my $uri = URI->new( $producer_list_url );
my $req = GET( $uri, 'Accept' => 'text/x-json' );
@@ -198,6 +197,19 @@
{
my $uri = URI->new( $cd_list_url );
+ $uri->query_form({ 'search.artist.artistid' => 1 });
+ my $req = GET( $uri, 'Accept' => 'text/x-json' );
+ $mech->request($req);
+ cmp_ok( $mech->status, '==', 200, 'search on rel column with same name fk request okay' );
+
+ my @expected_response = map { { $_->get_columns } } $schema->resultset('CD')->search({'artist.artistid' => 1}, { join => 'artist' })->all;
+ my $response = JSON::Syck::Load( $mech->content);
+ #use Data::Dumper; warn Dumper($response, \@expected_response);
+ is_deeply( { list => \@expected_response, success => 'true' }, $response, 'correct data returned for search on rel column with same name rel fk' );
+}
+
+{
+ my $uri = URI->new( $cd_list_url );
$uri->query_form({ 'search.title' => 'Spoonful of bees', 'search.tracks.position' => 1 });
my $req = GET( $uri, 'Accept' => 'text/x-json' );
$mech->request($req);
More information about the Catalyst-commits
mailing list