The foreign keys defined on the db on which these were tested have the following cascading definitions:
[sql]ON DELETE CASCADE ON UPDATE CASCADE;[/sql]
Without this configured in your schema, then the delete would need to be altered to explicitly delete related content before deleting the primary row to which the other data is related.
The book is making an attempt to be database agnostic, and glosses over some of the schema specific details. The download-able code has the full MySQL schema with these definitions in-place.
I cannot believe I overlooked the fact that FK constraints were not in my DDL file. What’s more embarrassing is that the plain English mySQL error in my face!!!
Thank you very much for this great resource Jeff. This is my first attempt to learn a framework and I’m really enjoying this experience though I might have to go through one more time. And the lack of sleep and caffeine is definitely not helping that’s for sure…