我有这种格式的全局数据:
^kza("mltab","TAB","Dta",1,1) = 3341
^kza("mltab","TAB","Dta",1,2) = "First Name"
^kza("mltab","TAB","Dta",1,3) = "type1"
^kza("mltab","TAB","Dta",1,4) = 7400.11
^kza("mltab","TAB","Dta",2,1) = 3614
^kza("mltab","TAB","Dta",2,2) = "Second Name"
^kza("mltab","TAB","Dta",2,3) = "type2"
^kza("mltab","TAB","Dta",2,4) = 7600.11
我的对象类如下所示:
Class Kza.Employees Extends %Persistent [ StorageStrategy = EmpStorage ]
{
Property num As %Integer; //unique identifier
Property id As %Integer;
Property num As %Integer;
Property name As %String;
Property type As %String;
Property pay As %Double;
Index NewIndex1 On id [ IdKey, PrimaryKey, Unique ];
<Storage name="EmpStorage">
<ExtentSize>100000</ExtentSize>
<SequenceNumber>8</SequenceNumber>
<SQLMap name="MasterMap">
<ConditionalWithHostVars></ConditionalWithHostVars>
<Data name="num">
<Node>1</Node>
</Data>
<Data name="name">
<Node>2</Node>
</Data>
<Data name="pay">
<Node>4</Node>
</Data>
<Data name="type">
<Node>3</Node>
</Data>
<Global>^kza</Global>
<RowIdSpec name="1">
<Expression>{L1}</Expression>
<Field>id</Field>
</RowIdSpec>
<Subscript name="1">
<Expression>"mltab"</Expression>
</Subscript>
<Subscript name="2">
<Expression>"TAB"</Expression>
</Subscript>
<Subscript name="3">
<Expression>"Dta"</Expression>
</Subscript>
<Subscript name="4">
<Expression>{id}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^Kza.EmployeesS</StreamLocation>
<Type>%CacheSQLStorage</Type>
</Storage>
}
问题是,如果我这样做
insert into Kza.Employees(id, num, name, pay, type) VALUES(132, 3214, 'Name Second', 89000, 'type5')
结果是:
^kza("mltab","TAB","Dta",1) = ""
^kza("mltab","TAB","Dta",1,1) = 3214
^kza("mltab","TAB","Dta",1,2) = "Name Second"
^kza("mltab","TAB","Dta",1,3) = 'type 5'
^kza("mltab","TAB","Dta",1,4) = 89000
但我不需要保存第一行,所以如何消除保存这个节点:
^kza("mltab","TAB","Dta",1) = ""