By default, Cake clears down the entire habtm table (for the current 
association) and adds back in just those that are in the current saved dataset. 
So if a cart has three orders and you try to add another in isolation the first 
three are cleared and replaced with the new one. If you are trying to add just 
a new cart_order and want to preserve the existing ones you are best off 
creating a model for the habtm table and managing it just as you would any 
other model.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 10 Oct 2012, at 22:03:26, crush <t...@gurske.com> wrote:

> Hey,
> I have an orders table, a carts table and a carts_orders table. Every once 
> and a while, I lose some of the rows from the carts_orders table. They are 
> being created properly but are being deleted at some point. I have been 
> trying to figure it out but everything in the applications works 99.9 percent 
> of the time and it's very difficult to nail down exactly what's happening. 
> 
> My questions is: What CakePHP methods would cause those rows to be deleted, 
> but not the associated entries in the carts and orders tables?
> 
> Any help would be appreciated!
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to