[Dbix-class] serializing DBIx::Class::ResultSourceHandle

Bernhard Graf dbic3 at augensalat.de
Wed Sep 19 23:05:36 GMT 2007


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?

-- 
Bernhard Graf



More information about the DBIx-Class mailing list