HABTM is not relation you are looking for I think, I usually model this with a table_1 hasMany joinTable, table_2 hasMany joinTable, and joinTable belongsTo both table_1 and table_2.
-Mark On Dec 18, 3:16 am, Colin <[email protected]> wrote: > Hi All, > > I have a model for HABTM like so: > > id > table1_id > table2_id > weight > created > modified > > I only want the weight to be unique for table1_id, but when I do an > insert at the moment, all the weights in the table are changed > automagically. > > Is there a way to tell cake to only increment the weight where > table1_id is the same? > > Any pointers most welcome > > Thanks in advance, > > Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~----------~----~----~----~------~----~------~--~---
