myapps平台中对于外部映射表,如何插入一条记录?
请看如下:
[ID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NOT NULL,
[LASTMODIFIED] [datetime] NULL,
[FORMNAME] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[OWNER] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[AUDITDATE] [datetime] NULL,
[AUTHOR] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[CREATED] [datetime] NULL,
[ISSUBDOC] [bit] NULL,
[FORMID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[CHILDS] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[ISTMP] [bit] NULL,
[FLOWID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[VERSIONS] [numeric](10, 0) NULL,
[SORTID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[APPLICATIONID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[STATELABEL] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[AUDITUSER] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[AUDITORNAMES] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
[LASTFLOWOPERATION] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[STATEINT] [numeric](10, 0) NULL,
[PARENT] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[STATE] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[LASTMODIFIER] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[DOMAINID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
[AUDITORLIST] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
[MAPPINGID] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
此中,主要关注IDORDER主键。
每插入一条记录到IDORDER中,则自动向T_DOCUMENT中插入一条记录。
如何新增外部记录(就O_ORDER表关联T_DOCUMENT举例)
1)先向O_ORDER表中插入一条记录,记住IDORDER的值:{IDORDER}
2)再向T_DOCUMENT表中插入一条记录,重点关心以下字段:
[ID] 值为任意唯一的值
[FORMNAME] 值为{贵宾服务管理系统/订单管理/o_busiorder}或者{贵宾服务管理系统/订单管理/o_govorder}
[FORMID] 值为{11e0-9270-779cc563-b074-a7501cfffd54}或者{}
[APPLICATIONID] 值为{11df-feb0-6688bb14-8521-99fd4ea7469e}
[DOMAINID] 值为{11df-feb0-8287a1ae-8521-99fd4ea7469e}
[MAPPINGID] 值为O_ORDER表中插入的记录主键{IDORDER}
例如插入一条记录到T_DOCUMENT
insert into T_DOCUMENT values('11e0-f983-df54bfbe-a06e-d9ecd254bf09','2011-10-18 20:23:48.557','贵宾服务管理系统/订单管理/o_busiorder',NULL,NULL,'11e0-7b7a-db3e13de-922a-5fa8b8a4498a','2011-10-18 20:22:40.403',NULL,'11e0-9270-779cc563-b074-a7501cfffd54',NULL,0,NULL,0,NULL,'11df-feb0-6688bb14-8521-99fd4ea7469e',NULL,NULL,NULL,NULL,0,NULL,NULL,'11e0-7b7a-db3e13de-922a-5fa8b8a4498a','11df-feb0-8287a1ae-8521-99fd4ea7469e','{}','ff92e23c-f24b-4ffa-b78c-sdfssdfsdfsdf')