Bernhard Graf wrote:
> I have a problem when a Row obect goes through a session:
> 
> At the beginning I create a Row object (from Catalyst app) with
> 
>   $data = $c->model($TABLE)->new_result({...});
> 
> $data is filled from forms of the following pages. To make it 
> persistent, $data is stored into the session.
> 
> Finally I want to
> 
>   $data->insert
> 
> but I get: 
> 
>   Can't call method "source" on an undefined value at
>   /usr/lib/perl5/vendor_perl/5.8.5/DBIx/Class/ResultSourceHandle.pm
>   line 62
> 
> It turns out the schema property of DBIx::Class::ResultSourceHandle is 
> deleted before it is serialized.
> 
> It seems I have to restore the schema manually into the object before I 
> ->insert().
> Is that correct?
> If yes - how to?
> 

I wrote the ResultSourceHandle stuff, and I never could come up with a
good way of specifying what schema to use in thawing the data. So
currently you'd have to do

$data->_source_handle->schema($schema);

That really needs a better way of being handled tho. I'm open to
suggestions.

-ash

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to