[Catalyst] $row->copy causing exit from controller(!)
Paul Makepeace
paulm at paulm.com
Thu May 1 11:31:40 BST 2008
I'm seeing something exceedingly odd: copying data causing a premature
return from the controller, like a detach(),
foreach my $table (@chart_related_tables) {
my $rs = $ds->resultset($table);
warn "copying $table for ", $new_chart->uid;
for my $row ($rs->search({web_chart_spec_uid => $chart->uid})) {
warn "..row ", $row->web_chart_spec_uid, $row;
$row->copy({web_chart_spec_uid => $new_chart->uid}); # XXX
}
#$_->copy({web_chart_spec_uid => $new_chart->uid})
#for $rs->search({web_chart_spec_uid => $chart->uid});
die "cloned", $new_chart->uid;
}
There's no further execution past the line marked XXX: the template is
rendered from that point on. The die is never called.
I have a feeling it's something to do with has_many
Chart:
__PACKAGE__->has_many(chartview_company => 'IDL::Schema::ChartCompany'
=> 'web_chart_spec_uid', {cascade_delete => 0});
If I exclude from @chart_related_tables ChartCompany it works.
**
I realize there's scads of debug I could provide but wanted to check
first this wasn't something someone had run into before. If not, what
kind of debug can I provide?
DBIC $VERSION = '0.08009';
Catalyst 5.7012
Paul
More information about the Catalyst
mailing list