[Dbix-class] What would cause has_many relation accessor to query and return objects using the wrong table/class ?

Aaron Trevena aaron.trevena at gmail.com
Tue Jul 29 11:21:30 BST 2008


2008/7/28 Matt S Trout <dbix-class at trout.me.uk>:
> On Mon, Jul 28, 2008 at 03:49:16PM +0100, Aaron Trevena wrote:
>> Hi All,
>>
>> I have a peculiar problem.
>>
>> I've defined a bunch of has_many relations, but when I call them an
>> object they use the it's own table and class...
>
> I think you've somehow registered an extra result source for one of the
> two and/or messed up ->source_name.
>
> Can you possibly produce at the very least redacted versions of the
> CustomField -and- CustomFieldValue classes, and dump
>
> My::Schema->source_registrations
>
> plus
>
> $schema->source_registrations
>
> and see if you can spot a problem - and if you can't, also post recated
> versions of those.

I've managed to isolate the problem to only occuring after the object
has been thawed from the cache and the source refreshed, but no
further than that as the data I'm using for the relationships should
be pulled from said cache anyway.

It's very puzzling, everything works elsewhere apart from relations
from this thawed object. No time to investigate it further at the
moment I'm afraid.

A.

-- 
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Hosting



More information about the DBIx-Class mailing list