Mapping Legacy Global to Persistent class storage

Primary tabs

I want to map global ^myUnitTests(ID)={Start}_"^"_{JOB} where {Start} and {JOB} are two properties and ID is determined by $Increment(^myUnitTests).

I defined this class but it will not compile:

Class UnitTest.Test Extends %Persistent [ StorageStrategy = NewStorage1 ]
{ Property JOB As %String; Property Start As %String; Storage NewStorage1
{
<IdFunction>increment</IdFunction>
<IdLocation>^myUnitTests</IdLocation>
<SQLMap name="Map1">
<ConditionalWithHostVars></ConditionalWithHostVars>
<Data name="JOB">
<Delimiter>"^"</Delimiter>
<Piece>2</Piece>
</Data>
<Data name="Start">
<Delimiter>"^"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>^myUnitTests</Global>
<Type>data</Type>
</SQLMap>
<StreamLocation>^UnitTest.TestS</StreamLocation>
<Type>%Storage.SQL</Type>
} }
 

Replies