Relationship Difficulties [SOLVED]

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

Relationship Difficulties [SOLVED]

Postby cantlep » Wed Mar 17, 2010 6:25 pm

Hi Again, Sorry..I seem to be taking up a lot of time on this board :-(

I've created what I think is a many-many relationship...but something is still not working properly (there's a surprise).

I have two normal tables "SiteData" and "ContractData" and a thrid table (to handle the relationship) called "SiteData_ContractData"

In ContractData I want to be able to create a new contract and have a list of Sites made available (pulled from SiteData) that could be a member of that contract. I've created a relationship so that the Sites appear with checkboxes next to them (great). I can select any number of them and create the contract. All is well.

However....

If I create another contract I'm unable to re-use those Sites I used previously...and I really need to be able to allow Sites to be members of multiple contracts (It actually says they've been successfully added - but they really haven't). I did have a weird issue at one point of this feature creating duplicate Sites in "SiteData" but it's stopped now (which is good) (possibly because I messed with the UNIQUE key).

tables/ContractData/fields.ini
Code: Select all
[SiteName]
widget:label = "Site Name"
widget:question = "Select one or multiple sites for this contract"
transient=1
relationship=SiteData
widget:type=checkbox
widget:columns=5
validators:required = true


tables/ContractData/relationships.ini
Code: Select all
[SiteData]
SiteData_ContractData.ContractRecordID="$ContractRecordID"
SiteData_ContractData.SiteName=SiteData.SiteName


Have I messed something up that you can see?

Thanks again.

Paul
Last edited by cantlep on Thu Mar 18, 2010 3:32 am, edited 1 time in total.
cantlep
 
Posts: 172
Joined: Fri Mar 05, 2010 2:14 am

Re: Relationship Difficulties [SOLVED]

Postby cantlep » Thu Mar 18, 2010 3:04 am

All sorted - Composite key issue (checked with a DBA at work :-) )

Cheers
cantlep
 
Posts: 172
Joined: Fri Mar 05, 2010 2:14 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 32 guests

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