go to post Robert Cemper · Nov 17, 2022 that simply means that value doesn't contain a valid object id.You may see valid ids running SELECT %ID FROM DATA.Persistent most likely some integer
go to post Robert Cemper · Nov 17, 2022 check if your value is an existing Id after the %OpenId if 'Obj do $system.OBJ.DisplayError()else zwrite Objso you see what's going on
go to post Robert Cemper · Nov 17, 2022 the method to open isSet Obj=##Class(Data.Persistent).%OpenId(value) COS is case sensitive
go to post Robert Cemper · Nov 17, 2022 your example has neither a Property Dischargenor as Serial object Discharge with a Property DischargeFlag<INVALID OREF> refers to the missing Property as SerialObjectIt seems you try to create properties and substructures similar to JSON.You have to define everything in advance before you can use it.
go to post Robert Cemper · Nov 9, 2022 To achieve the expected result of individual storage you may take this approach: Class Test.NewClass Extends %Persistent [ NoExtent ] { Property Name As %String [ Required ]; Index NameIndex On Name [ Unique ]; } and Class Test.NewClass1 Extends Test.NewClass { Storage Default { <Data name="NewClass1DefaultData"> <Value name="1"> <Value>%%CLASSNAME</Value> </Value> <Value name="2"> <Value>Name</Value> </Value> </Data> <DataLocation>^Test.NewClass1D</DataLocation> <DefaultData>NewClass1DefaultData</DefaultData> <IdLocation>^Test.NewClass1D</IdLocation> <IndexLocation>^Test.NewClass1I</IndexLocation> <StreamLocation>^Test.NewClass1S</StreamLocation> <Type>%Library.CacheStorage</Type> } } and you see:ERROR #5808: Key not unique: Test.NewClass1:NameIndex:^Test.NewClass1I("NameIndex"," A1")
go to post Robert Cemper · Nov 7, 2022 if you know the process id then $SYSTEM.Process.Terminate( . . .) should terminate it
go to post Robert Cemper · Nov 6, 2022 All said: the processor has too many cores which is not allowed by Community edition license So get an official distribution and an official/evaluation license: https://wrc.intersystems.com/wrc/coDistEvaluation.csp
go to post Robert Cemper · Nov 5, 2022 LAST_IDENTITY () only refers to %ROWID and is quite volatile and just a getter for %ROWID so you may run this query immediately following your INSERT &SQL( SELECT id into :pid from users where %ID=LAST_IDENTITY() ) or simply &SQL( SELECT id into :pid from users where %ID=:%ROWID )
go to post Robert Cemper · Oct 26, 2022 set claim=##class(Claim).%OpenId(claimnum) ; or similar set line=##class(ClaimLine).%OpenId(linenum) ; or similar do claim.ClaimLineRel.Insert(line) now your query should work