Code: Select all
master table (
id serial primary key,
name varchar(50)
);
detail table (
id serial primary key,
master_id integer,
name varchar(50)
);
pgQuery1 connected to master table, SQL = 'SELECT * FROM master', cachedupdates = true, keyfields = id, keysequence = master_id_seq
pgQuery2 connected to detail table, SQL = 'SELECT * FROM detail', cachedUpdate = true, keyfields = id, keqsequense = detail_id_seq, mastersource = dtsMaster, masterfields = id, detailfields = master_id
then
1. append a record to pgQuery1 (master table), post
2. append a record to pgQyery2 (detail table), post
3. pgQuery1.applyupdate
after pgQuery1.applyupdate, all pgQuery2 record disappeared, why? and there're also no value (blank) in master_id field column
i've used other DAC before, i found that there should be a -1 in "id" field column, something wrong?
thanks & regards (urgent!)
jacky
background: delphi xe2, pgDAC latest trial version, postgresql v8.4