Code
The order for reconciling changes to related data is as follows:
-
Delete child records (in this case, delete records from the
Orders
table) -
Delete parent records (in this case, delete records from the
Customers
table) -
Insert parent records (in this case, insert records in the
Customers
table) -
Insert child records (in this case, insert records in the
Orders
table)
本文转自灵动生活博客园博客,原文链接:http://www.cnblogs.com/ywqu/archive/2009/02/27/1399278.html
,如需转载请自行联系原作者