08-09-2021, 12:34 AM
(01-22-2021, 04:00 PM)remkonoteboom Wrote: It is meant to used for custom data that is in addition to the base data model of your solution. There is no inherent dependency in TACTIC for this column so you can use it at will. However, always bear in mind that other plugins may also use this column for their purposes, so you should be careful not to just clear it out. It is generally used as a dictionary, so best practices would be to use your own keys and add to the data structure.May be we should add a convinient method that adds the desired dictionary to an existing one?
You can access the data with:
data = sobject.get_json_value("data")
You can also access a key element with the following:
value = sobject.get_value("data->my_key")
The expression language will also allow this notation
value = Search.eval("@GET(vfx/shot.data->my_key)")
This column is added automatically just to standardize a location. There is nothing stopping you from using this column or creating your own jsonb column. It's up to your design.
Something like: append_json_value('data', {'name': 'val'})