How to get values from a serialobject class
Hi,
I
want to get the values from a serial property because my code depends upon the class serial class.
For example
Serial class
Class Data.Serial Extends %SerialObject
{
Property FirstName as %String;
Property LastName as %String;
}
Persistent class
Class Data.Persistent Extends %Persistent
{
Property MPID as %Integer;
Property Name as Name.Serial;
}
Now i need save MPID and Name(Serial class property into SQL Table ) so i am trying the below class
Class Data.TestUtil Extends
{
Method Savedata(MPID,FirstName,LastName)
{
Set tSC=0
Set Obj=##Class(Data.Persistent).%New()
Set Obj.MPID=MPID
Set Obj.FirstName=FirstName
Set Obj.LastName=LastName
Set tSC=Obj.%Save()
Quit tSC
}
}
But data is not getting saved into SQL data and throwing an error, How to save serial class Property into the SQL table?
Thanks,
Smythee