XP is just a number | |
PerlMonks |
Class::DBI cascading delete problem?by zigdon (Deacon) |
on Sep 27, 2004 at 14:46 UTC ( [id://394184]=perlquestion: print w/replies, xml ) | Need Help?? |
zigdon has asked for the wisdom of the Perl Monks concerning the following question:
Sounds like this would be a FAQ, but searching on PM, C:DBI list and wiki didn't come up with anything.
Say I have the following tables:
org: - orgid - ... parttype: - typeid - orgid - ... orgpart: - opid - typeid - ... And the C:DBI classes that define the following relationships:
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
Back to
Seekers of Perl Wisdom
|
|