[Dbix-class] Self-Reference table configuration issue
Hill, Woodrow J
woodrow.j.hill at bankofamerica.com
Wed Oct 18 23:30:59 CEST 2006
>> [SelfReference.pm : Module for self-referenced table] [...]
>> __PACKAGE__->has_many(higher_xref => 'Project::CrossReference',
>> 'HigherInformation');
>> __PACKAGE__->has_many(lower_xref => 'Project::CrossReference',
>> 'LowerInformation');
>
> I think these two lines are wrong, and you need to swap the third
args.
>
> If you think about it, if you're referring to *lower* info than
> yourself, then logically you want to be *higher* thing in the link
> table, and vice versa.
Works like a charm, and makes perfect sense. Thank you very much,
Matt!
> Declaration syntax that will be proof against us being silly
> buggers is in the works :)
Isn't that called Test::More and Friends? *smirk*
> --
> Matt S Trout Offering custom development, consultancy and
support
----Woodrow
More information about the Dbix-class
mailing list