*-- Assuming we are in a DM. this.REPLACE('Fundstmp', 'FundTmpID', ; FundTmpID WITH PRIMARYKEY('Fundstmp','FundTmpID','Counters.Primary Key Batch Money') )>Then, the following is placing the Parent key in the child view for the relation. However, wouldn't CodeMine have already done this... since the lPkAuto is set True in the CDE?
>THIS.Replace('Fundstmp','PeopleID',Person.PeopleID) >"lAutoPK" is a cursor related option set for each cursor and not a CDE related "overall" option. The updating of a child table's FK (from its parent's key field) has nothing to do with the lAutoPK setting - lAutoPK is only about the automatic assignment of a PK value for a cursor if you fail, deliberately or otherwise, to specifically add a PK value to the indiviual cursor when a new record is created. If there is a described relationship in the CDE (ie., for related tables, a cursor object has the appropriate values set like its own index order (cOrder), and its cParent and cParentKeyField values specified, Codemine knows how its managed cursors are related. So, if you take care of the PK for each individual cursor (although not totally necessary if lAutoPK is True for the individual cursor), Codemine will automatically update the FK field of each cursor in the parent's child cursor collection (as long as each cursor is known to the managed cursor list - ie., has been defined in the CDE or added to the managed cursor list using AddCursor()).