Avandgard,

This is a fairly common problem.  Once you start adding attributes
like quantity, and price to your join table (structures_users), it has
been recommended you use hasMany/belongsTo relationships between the
three tables involved.

Read the subsection 'What to do when HABTM becomes complicated?' on
this page - http://book.cakephp.org/view/85/Saving-Related-Model-Data-HABTM

-teh

On May 23, 12:51 pm, Avandgard <[email protected]> wrote:
> Hi all...
>
> I aheve three tables
>
> users (id, username...)
> structures (id, name, def_quantity, def_price)
> structures_users (id, user_id, structure_id, quantity, price)
>
> i tried HABTM, but i have problem with saving other data than user_id/
> structure_id.... please can you help me how to design it? I want to
> one user can to have many structures but only of one type (structures
> table).... do you know how to do it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to