Child ID in many to many not being written to join table in

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

Postby Aoirthoir » Thu Oct 26, 2006 6:28 pm

Well Ive played around back and forth with this and something isnt quite right. Not sure if I did something. So finally I just stepped back and went to the standard dataface code..

Even stripped out all of my extra fields so I had an ID field, PID and CID and thats it...(with a copy of course) emptied the table and tried to add existing records...as a test I used my S_USER table and my D_TASK table. If I add new..it works fine...so here is the code in relationships.ini:


[D_TASK]
action:label = Children
__sql__ = "
SELECT * FROM R_save, D_TASK
WHERE R_save.PNAME='D_TASK'
AND R_save.CNAME='D_TASK'
AND R_save.PID='$ID'
AND D_TASK.ID = R_save.CID
ORDER BY R_save.OID, D_TASK.DESCRIPTION"


[S_USER]
S_USER.ID = R_.CID
R_.PID = "$ID"


As you can see the one for S_USER is just plain dataface code..no sql at all. Both of the ones above work fine in add new..but fail in add existing.

Not sure if anyone else is having this problem and it is a minor bug..or it is just me..

THank you kindly .
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 30, 2006 11:33 am

Okay.. could be a bug.. but generally I find that when I have problems like this, it is caused by the table definitions being a bit off. For example, if a field should be auto-increment but is not; if the primary keys are not set correctly..;... hard to say.. if you post the table defs perhaps I will be able to spot something.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Mon Oct 30, 2006 6:33 pm

I will try to post them soon..right now I am updating a database...having a great time with all the new features in DF.

This isnt a huge priority for me, because as I realized..most of my users wont ever be doing anything like this at all...a customers links for instance will never be moved to another place..only added. In fact we conversed today and decided to remove the ability to do deletes at all..now if I could just remember what that setting is:)
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 30 guests

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