Storing a %DynamicObject
I've been tasked with an interface that needs to supply some additional metadata for the indexing of HL7v2 messages. After toying with a couple of ideas, I thought that it would be useful to subclass EnsLib.HL7.Message, add a %DynamicObject property, and store the metadata in it (it ends up getting sent to the target in JSON form anyway).
And, well, it seems to work just fine ... so far.
I seem to remember that %DynamicObjects are not persistent, and for that reason not something you would normally stuff into a database. I was a little surprised when things worked as I had hoped. With ZWRITE, the literal name of the property doesn't show up in the list of attributes, but it does show with an i% prefix under swizzled references. It also shows up, along with assigned contents, in an SQL query of the projected table. I can modify it in a DTL and the values seem to persist.
I just have this odd feeling that what I'm doing is NOT OK. Can someone confirm one way or another?