Another relation issue

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

Postby wreid » Wed Oct 25, 2006 9:04 am

I really love this system, however, I seem to get caught up in problems when I least expect it.

I have a two tables that relate to each other "matrix_episode_item" and "matrix_item" -

Table "matrix_episode_item"
EPISODE_NUMBER int(4) Primary key
ITEM_ID int(11) Primary Key
ITEM_DESC text

Table "matrix_item"
MATRIX_ID int(11) Primary Key
ITEM_ID int(11) Primary Key
ITEM_NAME varchar(60)
ITEM_IMG text

within the "matrix_item" folder I have a relationship.ini file with this
[SpecificEpisodeItems]
matrix_episode_item.ITEM_ID = "$ITEM_ID"
action:label = "Episode comments specific to item"

-----------

The example data from "matrix_item" looks like:
4 <- the show series identifier
12 <- the unique character id
Breanna <- character name
breanna.jpg <-picture

-----------

whereas the data from "matrix_episode_item" looks like:
1 <- current episode
12 <- character id
Episode #1 for Breanna <- the comment said in that episode

2
12
Episode #2 for Breanna

3
12
Episode #3 for Breanna

4
12
Episode #4 for Breanna

I was hoping to make a relationship between the "matrix_item" and the specific episodes, however, when I use the above code I get a "Loading..." with no results and sometimes it gives me an apache error.

There are also "episode" and "matrix" table as well, but I'm not sure it relates to the present problem. I've been trying to work this out, but I'm still too inexperienced with this application.

Again thanks in advance to any help!
walter
wreid
 
Posts: 27
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Oct 26, 2006 11:05 am

Okay.. it is possible that you have uncovered a bug, but there are a few things that stand out from your post.

1. The relationship should be defined in a file named "relationships.ini" not "relationship.ini" (i'm assuming the post just had a typo.

2. I notice that you are using a double primary key for the matrix_item table (MATRIX_ID,ITEM_ID), but your relationship only relates on a single field (ITEM_ID). I would think that your primary key should just be the ITEM_ID column. This may or may not be causing your problem.

Also, this tree will probably not have any child-nodes for records of the matrix_episode_item table, unless you have some relationships defined on that table too (in the tables/matrix_episode_item/relationships.ini file).

Hope this helps a little.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
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 28 guests

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