From: "Simon Wilcox" <[EMAIL PROTECTED]>
You will have to iterate over the accessors individually to put them into
the stash (I think) but you should be able to use DBIC to do most of the
thinking. Something like (untested):
my $model = $c->model("Database::Table");
foreach my $column (@{$model->columns}) {
$column =~ s{me\.}{}; # strip the prefix DBIC adds
$c->stash->{$column} = $obj->$column;
}
I have tried that, but it gave the following error:
Can't locate object method "columns" via package "DBIx::Class::ResultSet
What am I doing wrong?
Thanks.
Octavian
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/