You can't freeze DBIC objects that way--they lose special meta attributes--and the session isn't really meant for passing around that kind of data. The stash is, though I realize you're redirecting so you have no choice. This tweak should make it work (untested though). I'd question whatever logic/design led you to save a bunch of data in the session and then redirect; it's probably not the best way to accomplish whatever you're trying to do. You'll probably need to install DBIx::Class::ResultClass::HashRefInflator; I'm pretty sure it's not in the core package.
my $rs = $c->model("DB")->resultset("MyTable")->search(); # This is *probably* what you want and can do instead- # my $rs = $c->model("DB::MyTable")->search(); $rs->result_class('DBIx::Class::ResultClass::HashRefInflator'); $c->session->{data} = [ $rs->all ];
In reply to Re: Catalyst redirect schema freeze/thaw example
by Your Mother
in thread Catalyst redirect schema freeze/thaw example
by wypm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |