[Dbix-class] Caching a resultset?

Peter Rabbitson rabbit+dbic at rabbit.us
Mon Jan 14 11:18:15 GMT 2013


On Mon, Jan 14, 2013 at 09:26:04AM +0100, Alexander Hartmaier wrote:
> The resultset has a ref to the schema which in turn has one to its
> database connection which can't be serialized/cached.
> After unfreezing it you have to link the $rs back to a schema with a
> working database connection.
> I wasn't able to find this in the docs although I'm pretty sure I've
> read it sometimes.
> 

It is at a crappy place in the docs[1][2], but the error message that was 
supposed to print is pretty comprehensive[3]. Obviously improving the 
docs is never a bad idea.

[1] https://metacpan.org/module/DBIx::Class::ResultSourceHandle#STORABLE_thaw
[2] https://metacpan.org/module/DBIx::Class::Schema#thaw
[3] https://metacpan.org/source/GETTY/DBIx-Class-0.08204/lib/DBIx/Class/ResultSource.pm#L1132

Cheers




More information about the DBIx-Class mailing list