Many to many relationship strange behaviour

Archived from the Xataface Users forum.

silma — Fri Sep 02, 2011 1:09 am

Hello Steve, Hello all Xataface users there ,

I noticed a strange behaviour with a many to many relationship ; I could not say if it occured since version 1.3rc5 or since 1.3rc6.

I used to have my relationship between my tables “batiment” and “compteur” in \tables\batiment\relationship.ini file defined like that :

Code: Select all
`[Compteurs]
sql = “SELECT * FROM compteurbatiments cb INNER JOIN compteur c ON (cb.CompteurID = c.CompteurID and cb.BaseID = c.BaseID ) WHERE cb.BatimentID = ‘$BatimentID’   ”

action:order=4
vocabulary:existing = Compteurexistant
action:visible=0`

Untill recently, it worked.
Now, when i do “Add existing record”, it duplicate the “compteur” record.

I replace the relationship in \tables\batiment\relationship.ini file with :

Code: Select all
`compteur.CompteurID =compteurbatiments.CompteurID
compteurbatiments.BatimentID = “$BatimentID”
compteurbatiments.BaseID = “$BaseID”

action:order=4
vocabulary:existing = Compteurexistant
action:visible=0`

It works again.

I just wanted to report it, if it can be useful for someone (or if i made a mistake before that can be pointed out !)

Sorry for my poor english,

Silma