User bio

Developer on the Language Interoperability Team at InterSystems.

Member since Nov 7, 2015
Replies:

I can provide a solution for this but it comes with warnings - SQL doesn't do well with polymorphic embedded objects. If that isn't an issue then consider using a factory pattern. You must define a base class that extends %SerialObject and it must be instantiable. Then, override %OnNew() to dispatch to the concrete class that you wish to instantiate. Perhaps pass in a type argument. That %OnNew() can return an OREF (or a %Status if an error occurs).

If you are interested in this model then I can provide a small demo.

-Dan

Open Exchange applications:
Certifications & Credly badges:
Dan has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following: