Hello everybody!
I need to define a relation between two table, but the join table need some other data and i don’t know how to use the link function.
I explain you
TABLE user
user_id (int)
user_name (varchar)
…
TABlE item
item_id (int)
item_name (varchar)
…
TABLE users_items
id
user_id (int)
item_id (int)
number (int)
As you can see, in the join table i need to define some extra fields like number that define more info for the relation.
Now, with link i would define a viaTable to define the hunction table (as explained here) and then use the link() function on the created item to save the relation.
But what can i do here? I think i need to create manually the relation saving all the data in the table with a sql query, but i hope there is a more fast and efficent way…
Any idea?
Thanks