On Tuesday, June 12, 2012 7:24:36 PM UTC+7, centralizeme wrote:
>
> I tried with 'unique' => false,
>
> It doesn't erase previous ones, but I can follow the same user many times, 
> so it's not that I guess ?
>
> And keepExisting seems to work exactly the same as 'unique' => true ...
>

When using `keepExisting` you would still need to pass existing 
associations, otherwise they're deleted.  It's better suited when you have 
'extra fields' that you don't want to lose in your habtm join table.


> Le mardi 12 juin 2012 13:11:26 UTC+2, MaJerle.Eu a écrit :
>>
>> if is problem only with deleting of habtm...check this then
>>
>>
>> http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasandbelongstomany-habtm
>>  
>>
>> and look at 'unique' key in habtm relationship :)
>>
>> --
>> Lep pozdrav, Tilen Majerle
>> http://majerle.eu
>>
>>
>>
>> 2012/6/12 centralizeme 
>>
>>> Hello,
>>>
>>> I'm using Cakephp since a few monthes, and I am currently implementing 
>>> the last core function to my app, wich would be a follower system ala 
>>> Twitter.
>>>
>>> But I'm having hard tiime with HABTM because of it's save method wich 
>>> erases previous existing relationships.
>>>
>>> So I was wondering who managed to achieve such a system on its app, and 
>>> mainly wich whose architesture (tables / relationships).
>>>
>>> Thanks a lot for any help.
>>>
>>> D.
>>>
>>> -- 
>>> Our newest site for the community: CakePHP Video Tutorials 
>>> http://tv.cakephp.org 
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and 
>>> help others with their CakePHP related questions.
>>>  
>>>  
>>> To unsubscribe from this group, send email to
>>> [email protected] For more options, visit this 
>>> group at http://groups.google.com/group/cake-php
>>>
>>
>>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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