many to many relationship question
Posted: Tue Feb 16, 2010 12:46 am
Hi all,
I am new with Xataface and before starting to use it I have a question regarding many to many relationship setup. Do you setup your relation in the mysql too or only within xataface. So if I have two tables, Users and Telephones where a user has many telephones and a telephone could belong to many users, then I would normally have three tables in mysql, users, telephones and userTelephone (with user_id and telephone_id fields only). Then how do you do this with Xataface for the frontend ? I want to see my user table and in the view I need to have all telephones number for that user ... Also on the telephones view I need to see for each telephone to whom it belongs too.
Thank you for your help.
Fabrice,
I am new with Xataface and before starting to use it I have a question regarding many to many relationship setup. Do you setup your relation in the mysql too or only within xataface. So if I have two tables, Users and Telephones where a user has many telephones and a telephone could belong to many users, then I would normally have three tables in mysql, users, telephones and userTelephone (with user_id and telephone_id fields only). Then how do you do this with Xataface for the frontend ? I want to see my user table and in the view I need to have all telephones number for that user ... Also on the telephones view I need to see for each telephone to whom it belongs too.
Thank you for your help.
Fabrice,