Welcome to the Monastery | |
PerlMonks |
Using DBIx::Class To Delete Row With Foreign Keysby varanasi (Scribe) |
on Jan 24, 2019 at 15:46 UTC ( [id://1228927]=perlquestion: print w/replies, xml ) | Need Help?? |
varanasi has asked for the wisdom of the Perl Monks concerning the following question: Using DBIx::Class, I would like to delete a row from a table that contains a field referencing a foreign key. When I try, get this error message (via Catalyst):
Would you be kind enough to help me? This problem has harassed me before. Normally, I simply delete away, and life is fine. I don't really know what I'm doing and just trust DBIx::Class to take care of me. Most of the time, it does. Then, the problem pops up, and I mangle things until I get something to work. I've looked at code that works and compared it to code that doesn't, and I'm too inexperienced to see a difference. The time has come for me to finally figure out what is going on. Specifically, I would like to delete a row from table Member that references a row in table User. I don't wish to touch the row in User. Here's the line I'm using to do the delete:
Here are the relevant part of my Schema and database sql files (slimmed down):
2019-01-25 Athanasius fixed first code block (line was too wide)
Back to
Seekers of Perl Wisdom
|
|