Hi all, I'm wondering if is possible to get the values of itself to run a query. I want to create some query to find a value into a %Persistent class but each one use diferent values.
Class Kurro.MyClass Extends %Persistent { /// Key of process Property KeyProcess As %String(MAXLEN = ""); /// Specialist Property CodeSpecialist As %String; /// Provider Property CodeProvider As %String; /// Center Property CodeCenter As %String; /// Date Property Date As %TimeStamp; /// IdList Property IdList As %String; /// IdProcess Property IdProcess As %String; /// Duration Property Duration As %String; Query GetInfo(pObject AS Kurro.MyClass) As %SQLQuery(CONTAINID = 1, ROWSPEC = "IdList:%String,IdProcess:%String,Duration:%String") { SELECT IdList, IdProcess, Duration FROM Kurro.MyClass WHERE KeyProcess = :pObject.KeyProcess AND CodeSpecialist = :pObject.CodeSpecialist AND CodeProvider = :pObject.CodeProvider AND CodeCenter = :pObject.CodeCenter AND Date = :pObject.Date } }Then I call it by this way:
set obj=##class(Kurro.MyClass).%New() set obj.KeyProcess="1033004-1#" set obj.CodeSpecialist = "surgery" set obj.CodeProvider = "PR002" set obj.CodeCenter = "CENTER-01" set obj.Date = $ZDATETIME($ZDATETIMEH("2021-04-30 15:45:00",3,1),3,1) set result = obj.GetInfoFunc(obj)But I have the following error **%Message = "ERROR #5002: Error de cache: