Page 1 of 1
Creating a relationship
Posted:
Tue Mar 09, 2010 3:17 pm
by blange
I'm a xataface newbie trying to create my first relationship. I have a one to many relationship between Categories and Services. I thought all I needed to do was to go into /tables/category/relationship.ini and add
[Services]
service.category_id = "$id"
The primary key in the Categories table is 'id'. Am I doing something wrong? Is there any kind of cache I need to delete?
Thanks,
Brian
Re: Creating a relationship
Posted:
Tue Mar 09, 2010 3:22 pm
by shannah
I suspect that your problem is to do with table names.
E.g. you mention that the relationship is between tables named "Categories" and "Services". Yet in your relationship you are referring to a table named "service".
Re: Creating a relationship
Posted:
Tue Mar 09, 2010 3:26 pm
by blange
My tables are lower case "service" and "category".
Should I be getting any kind of error message? I don't seem to be.
By creating the relationship I am hoping to see the Category Name when in the "List View" for Service.
Is this what should happen?
Re: Creating a relationship
Posted:
Tue Mar 09, 2010 3:36 pm
by shannah
You won't see the relationship in list view. In details view, you should see an additional tab for your relationship. "View", "Edit", and now "Services"
Re: Creating a relationship
Posted:
Tue Mar 09, 2010 3:52 pm
by blange
I do see it. Thanks for the help!