[Catalyst-commits] r12294 - in Catalyst-Controller-DBIC-API/1.003: .
branches/moosify-validation-configurability/lib/Catalyst/Controller/DBIC/API
nperez at dev.catalyst.perl.org
nperez at dev.catalyst.perl.org
Thu Dec 10 14:30:15 GMT 2009
Author: nperez
Date: 2009-12-10 14:30:15 +0000 (Thu, 10 Dec 2009)
New Revision: 12294
Modified:
Catalyst-Controller-DBIC-API/1.003/
Catalyst-Controller-DBIC-API/1.003/branches/moosify-validation-configurability/lib/Catalyst/Controller/DBIC/API/Base.pm
Log:
r4264 at nicklaptop: nicholas | 2009-12-10 08:29:03 -0600
Properly expand objects for convenience return_object option and support json bool in searching
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
992f488a-d630-404b-95f9-f7d0fdf28443:/local/ccda:4262
+ 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.001:9528
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.002:9762
992f488a-d630-404b-95f9-f7d0fdf28443:/local/ccda:4264
Modified: Catalyst-Controller-DBIC-API/1.003/branches/moosify-validation-configurability/lib/Catalyst/Controller/DBIC/API/Base.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.003/branches/moosify-validation-configurability/lib/Catalyst/Controller/DBIC/API/Base.pm 2009-12-10 12:24:27 UTC (rev 12293)
+++ Catalyst-Controller-DBIC-API/1.003/branches/moosify-validation-configurability/lib/Catalyst/Controller/DBIC/API/Base.pm 2009-12-10 14:30:15 UTC (rev 12294)
@@ -192,7 +192,7 @@
# build up condition on root source
foreach my $column (@valid_cols) {
next unless (exists $params->{$column});
- next if ($_rel_map{$column} && ref $params->{$column});
+ next if ($_rel_map{$column} && (ref $params->{$column} && !($params->{$column} == JSON::Any::true() || $params->{$column} == JSON::Any::false())));
if ($_source_col_map{$column}) {
$search_params{join('.', $base, $column)} = $params->{$column};
@@ -251,7 +251,7 @@
my $empty_object = $c->stash->{$self->rs_stash_key}->new_result({});
$c->stash->{created_object} = $self->validate_and_save_object($c, $empty_object);
- $c->stash->{response}->{$self->data_root} = $c->stash->{created_object}
+ %{$c->stash->{response}->{$self->data_root}} = $c->stash->{created_object}->get_inflated_columns
if $self->return_object;
}
@@ -270,7 +270,7 @@
my $object = $c->stash->{$self->object_stash_key};
$object = $self->validate_and_save_object($c, $object);
- $c->stash->{response}->{$self->data_root} = $object
+ %{$c->stash->{response}->{$self->data_root}} = $object->get_inflated_columns
if $self->return_object;
}
More information about the Catalyst-commits
mailing list