Is it possible to have two discriminator fields in one document? I have a collection of magazines in Mongo. Each journal has a category field and an action field. The combination of these fields forms the log structure.
Example: We have the category "element" and the subcategories "element" (action field) "create", "file"
{
category: 'element',
action: 'create',
parent_element: ...
}
{
category: 'element',
action: 'file',
file_size: ...
file_type: ...
}
, ?
, dicriminator Element, , . , . , doc. ony Element.
class Log {}
class Element extends Log{}
class Create extends Element{}