Hi Gonçalo,

Although I assume that your actual models aren't really called "Foo"
and "Bar" and you're just using the classic metasyntactic variables for
your example, I did want to point out that the Cake convention for join
tables is to go alphabetically, and so the join table should be named
"bar_foo" rather than "foo_bar".

As I said, this probably isn't your problem, but I thought I'd chuck it
in just in case you weren't aware of the convention.

Cheers,

    Chris


Gonçalo Marrafa wrote:
> Hi bakers.
>
> I'm trying to delete a record from a model Foo that has a habtm association
> with a model Bar, through a foo_bar table. The problem is that when i try
> to delete the Foo record i get a constraint violation error because it is
> still referenced from the record at foo_bar!
>
> Shouldn't Cake delete the records of foo_bar that reference the record of
> Foo i'm deleting? I'm setting delete's cascade parameter to true.
>
> Am i missing something?
>
> Thanks in advance.
> 
> -- 
> Gonçalo Marrafa <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to