I think there are a number of bugs in the N-N Relations wizard.
For the table that is being updated (“Link table”), if you have additional fields other than the primary key and the foreign key (e.g. in the example outlined in your documentation “profile” CHAR(5)), then when you specify the attributes of such additional fields (“Link Attributes” step of the wizard) then the Scriptcase attributes return incorrect values.
If you specify a field value, it works fine.
I tested some of the Scriptcase attributes and these are the database values it returned:
Attribute: Value:
Null ->@nm@null
Calculated by database if empty ->@nm@db_calc_if_emp
If you leave the link attribute selection of a field blank, you get a code generation error:
Link Table table / fields missing:software.
(“software”)
WORKAROUND
Define the attribute of additional fields (that you don’t want to be updated) at the “Relationship keys” stage of the wizard as AutoIncrement. It’s a shame that Null doesn’t work though! This is used in the Samples example on the web site, but what then is the purpose of the Scriptcase attributes??