many to many relationship question

A place for users and developers of the Xataface to discuss and receive support.

many to many relationship question

Postby 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,
fabiofromfrance
 
Posts: 14
Joined: Mon Feb 15, 2010 3:03 pm

Re: many to many relationship question

Postby 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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 26 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved