Adding records to a many to many relationship

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

Adding records to a many to many relationship

Postby Grahams » Fri Jan 16, 2009 4:33 am

Hi

Just starting out with Xataface and am having some issues with many to many relationships.

I have defined the relationship and Xataface correctly displays the the related records.

However, when I attempt to add a new record to the realtionship, or add an existing record to the realtionship, no records are created.

Straightforward record creation is working fine

Am now struggling to figure out what is wrong as I have followed the Relationships guide in the getting started docs

Thanks
Graham
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am

Postby shannah » Fri Jan 16, 2009 10:53 am

What is the relationship definition (from the relationships.ini file)?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Grahams » Fri Jan 16, 2009 11:42 am

Hi

it is

[Property in Title]
property.ID = titleproperty.PropID
titleproperty.TitleNo = "$TitleNo"

Cheers
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am

Postby shannah » Fri Jan 16, 2009 11:52 am

Try removing the spaces from the relationship name. E.g.

Code: Select all
[Property_in_Title]
action:label=Property in Title
property.ID = titleproperty.PropID
titleproperty.TitleNo = "$TitleNo"


Note the use of the action:label directive to specify a label without spaces. If this fails, I'll need yet more information about your current set up. E.g. relevant table definitions (SQL).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Jan 16, 2009 11:53 am

Also, when you try to add items, do you get an error message at all? Does anything get inserted into the database at all? If so are some key fields not getting populated?

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Grahams » Fri Jan 16, 2009 11:58 am

Hi

No errors are thrown, and nothing goes into the database at all, in any table

Also, if I try and add a join to an exisitng record it fails, with no errors

Thanks
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am

Postby Grahams » Fri Jan 16, 2009 12:03 pm

sorry, only just noticed your other post, will try that and update you
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am

Postby Grahams » Fri Jan 16, 2009 12:09 pm

Sorted!!

Thanks for the speedy responses

It was the spaces causing the trouble

Cheers for your help on this
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am

Postby shannah » Fri Jan 16, 2009 12:15 pm

Thanks for pointing this out. I'll add this to the issue tracker so that future versions will scream loudly and give an appropriate error message in this case.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Grahams » Fri Jan 16, 2009 12:23 pm

No problem, just started using dataface this week and is much easier for putting a front end on mysql than Dreamweaver - keep up the good work!

Thanks

Graham
Grahams
 
Posts: 7
Joined: Fri Jan 16, 2009 4:26 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 21 guests

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