[Dbix-class] Re: Help with serialized objects -> old dbic
Peter Rabbitson
rabbit+dbic at rabbit.us
Wed Sep 19 10:38:03 GMT 2012
On Sat, Aug 18, 2012 at 09:57:51AM -0700, Bill Moseley wrote:
> I'm not sure I trust that quoted error message below. I did some more
> testing just now and came with a different set of errors. So, starting
> again:
>
> The existing app is using DBIC 0.08123 and the need to share objects with
> newer dbic -- and I've tested with 0.08198_01 and 0.08196.
>
> First, I set this in my apps because the DBIC objects are being places in a
> session (meaning I'm not explicitly calling the thaw() method in DBIC:
>
> $DBIx::Class::ResultSourceHandle::thaw_schema = $schema;
>
> Both versions work fine to freeze/thaw in their own version, but what
> breaks is trying to thaw the other versions serialized objects.
>
> When 0.08123 tries to thaw an object frozen with 0.08198_01 I get this:
>
> No STORABLE_thaw defined for objects of class Tii::DB::ResultSet (even
> after a "require Tii::DB::ResultSet;") at ../../lib/Storable.pm (autosplit
> into ../../lib/auto/Storable/_retrieve.al) line 380
>
>
> And going the other direction when 0.08198_01 tries to thaw an object from
> 0.08123 I get:
>
> DBIx::Class::ResultSet::first(): Unable to perform storage-dependent
> operations with a detached result source (source '_unnamed_' is not
> associated with a schema).
>
>
> which I thought $DBIx::Class::ResultSourceHandle::thaw_schema would fix.
>
> I feeling a bit stuck. I really need to be able to have mixed DBIC
> versions running at the same time.
>
> Only thing I can think of is to hunt down every place an object is
> serialized and thawed and just store an ID and then refetch from the
> database on thaw. Kind of defeats the entire purpose of caching these in
> the first place.
>
Did you ever resolve this, or do you still need help?
Cheers
More information about the DBIx-Class
mailing list