many to many relationship question
Archived from the Xataface Users forum.
fabiofromfrance — 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,
shannah — Tue Feb 16, 2010 1:18 pm
Hi Fabrice,
You set up your tables in Mysql as you normally would. In Xataface you just use the relationships.ini file to inform Xataface how you intend for the data to be related.