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
- Log in to post comments