zigdon has asked for the wisdom of the Perl Monks concerning the following question:
org: - orgid - ... parttype: - typeid - orgid - ... orgpart: - opid - typeid - ...
And the C:DBI classes that define the following relationships:
Org->has_many(Parts => [ "PartType" => "parts"]); Org->has_many(Types => "PartType"); PartType->has_a(orgid => "Org"); PartType->has_many(parts => "OrgPart"); OrgPart->has_a(typeid => "PartType");
The problem is that when I try to delete an org, I get the following error: "org is not a column of OrgPart at /usr/lib/perl5/site_perl/5.6.1/Class/DBI/Relationship/HasMany.pm line 61". And to that I say, right, but why is C:DBI looking for it? Shouldn't it make the org object, cascade to it's PartType objects, and from there cascase to all the OrgPart objects that refer to each PartType?
(This is not the actual code, so it's possible something was lose in the translation - even though I did take great case to make sure I got all the relevant parts).
Any suggestions or pointers would be very welcome!
-- zigdon
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Class::DBI cascading delete problem?
by meredith (Friar) on Sep 27, 2004 at 16:00 UTC | |
by zigdon (Deacon) on Sep 27, 2004 at 16:23 UTC | |
by meredith (Friar) on Sep 27, 2004 at 16:33 UTC | |
Re: Class::DBI cascading delete problem?
by gryphon (Abbot) on Sep 27, 2004 at 16:39 UTC | |
by zigdon (Deacon) on Sep 27, 2004 at 18:54 UTC |