The Master/Detail Behavior
问题 I use Delphi 7 + Zeos + MySQL, and I got a problem when I try to post Master table, the Details datasets are posted first, raising a referencial integrity exception in data base, 'couse details tables needs the ID of the Master table. Can I revert this behavior? Can I persist the master table before the details? 回答1: I think it's just the way TDataSet work. If you have unposted detail records, master. Post forces them to Post if I remember correctly. So I am guessing you have something like: