In the case where If I have a one to many relationship like Authors- >Books and I would like to delete an author - but only if this author has no books - is there a buiilt-in way to check?
I find that I run into this situation a lot (every time a table has a foreign key), and at the moment manually write a function in the model to check this. eg. for the Books model a method with the author_id as parameter that returns true if the author has books, false otherwise. But it seems like cakephp should be able to check this based on the model relationships, so is there something built-in I am missing? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---