Page 1 of 1

PostPosted: Mon Apr 09, 2007 7:42 am
by Scott
in the "getting started example", the programcourses table has a primary key consisting of programcourses.programid WITH programcourses.courseid.

thats ok. but often in a dbschema, tables similar to programcourses will need to be a given a 'programcoursesid' which should be the primary key to uniquely identify programcourses records in possible other relationships with more tables inside the schema (generally programcourses would get extra fields added in that case too).

without checking the php's first, i tried and made a primary key for programcourses (called programcoursesid) and set the programcourses.programid+programcourses.courseid to be a "UNIQUE" pair (instead of the primary key).
i did not get the expected result :D

how would i solve a scenario like this? ; where a linktable like programcourses needs to be used itself in a relationship (and thus needs a primary key id field so it can be used as foreign key).

Scott.

PostPosted: Mon Apr 09, 2007 8:41 am
by Scott
oops it DOES seem to work fine. i just forgot to make the programcoursesid an autoincrement field DOH!

i DID change the primary key staus of programcourses.programid + programcourses.courseid into UNIQUE instead of primary key.
will dataface be able to handle that change without any adverse side-effects?