Open bemky opened 2 years ago
Add support for record to have a dynamic type for an attribute
class Trait extends VikingRecord { static schema = { value_type: {type: "string"}, value: { type: { load: (value, attrs) => Types.registry[attrs.value_type].load(value), dump: (value, attrs) => Types.registry[attrs.value_type].dump(value) } } } }
Add support for record to have a dynamic type for an attribute