User bio
404 bio not found
Member since Sep 12, 2018
Replies:

Finaly "solved" with a call to "Clear" in the generic class.

Method bind(pModel As %DynamicObject, Output sc As %Status = {$$$OK}) [ CodeMode = objectgenerator ]
{
  set kProp = ""
  set prop = %compiledclass.Properties.GetNext(.kProp)
  while kProp '= "" {
    if prop.Collection = "list" {
      do %code.WriteLine(" do .."_prop.Name_".Clear()")
    }
    set prop = %compiledclass.Properties.GetNext(.kProp)
  }
  do %code.WriteLine(" set sc = ..%JSONImport(pModel)")
  do %code.WriteLine(" return")
  return $$$OK
}

Thank you for your inspiration ;-)

Regards

Certifications & Credly badges:
Yann has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following:
Yann has not followed anybody yet.