Re: Deleting Associations in HABTM possible without HABTM-Behaviour???

2008-10-28 Thread Dakapo

Hi Martin,

the patch solved the problem for this moment.

Thank you very much
Dakapo

On 27 Okt., 15:56, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi Dakapo,
>
> This is a bug in RC3. Check this ticket for a temporary patch you can
> implement if you need it:https://trac.cakephp.org/ticket/5579
>
> There is also other threads about this already. Like this 
> one:http://groups.google.com/group/cake-php/browse_thread/thread/5d5f3aea...
>
> /Martin
>
> On Oct 27, 3:26 pm, Dakapo <[EMAIL PROTECTED]> wrote:
>
> > Hello! I'm testing the CakePHP 1.2 RC3. I tried to delete a HABTM-
> > Association.
> > It only works if I have defined the $hasAndBelongsToMany in one of the
> > two models. As soon as I have defined it in both the delete-statement
> > is wrong :(
>
> > Until now I used the HABTM Add&Delete Behaviour from the bakery for
> > this. But isn't it possible in RC3 by Cake itself?
>
> > I have 3 tables:
> > customers
> > cities
> > cities_customers
>
> > If I start the admin_del-function it creates...
>
> > DELETE FROM `cities_customers` WHERE `cities_customers`.`city_id` = 1
>
> > But that should be...
> > DELETE FROM `cities_customers` WHERE `cities_customers`.`customer_id`
> > = 1
>
> > You can find the code of the models in the 
> > cakebin:http://bin.cakephp.org/view/506261235
>
>
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Deleting Associations in HABTM possible without HABTM-Behaviour???

2008-10-27 Thread [EMAIL PROTECTED]

Hi Dakapo,

This is a bug in RC3. Check this ticket for a temporary patch you can
implement if you need it:
https://trac.cakephp.org/ticket/5579

There is also other threads about this already. Like this one:
http://groups.google.com/group/cake-php/browse_thread/thread/5d5f3aea37a8b950/

/Martin


On Oct 27, 3:26 pm, Dakapo <[EMAIL PROTECTED]> wrote:
> Hello! I'm testing the CakePHP 1.2 RC3. I tried to delete a HABTM-
> Association.
> It only works if I have defined the $hasAndBelongsToMany in one of the
> two models. As soon as I have defined it in both the delete-statement
> is wrong :(
>
> Until now I used the HABTM Add&Delete Behaviour from the bakery for
> this. But isn't it possible in RC3 by Cake itself?
>
> I have 3 tables:
> customers
> cities
> cities_customers
>
> If I start the admin_del-function it creates...
>
> DELETE FROM `cities_customers` WHERE `cities_customers`.`city_id` = 1
>
> But that should be...
> DELETE FROM `cities_customers` WHERE `cities_customers`.`customer_id`
> = 1
>
> You can find the code of the models in the 
> cakebin:http://bin.cakephp.org/view/506261235
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---