A fileClass can also override a field it has inherited from by defining it again.
While this is definitely the preferred behavior I did find a case where this may have an unintended effect when using objects.
Create a parentFileClass and define myProperty and `someOtherProperty.
Create a childFileClass and extend parentFileClass.
Define a myObject field on childFileClass.
Create a myProperty field and set its parent to myObject.
Create a note with the fileClass set to childFileClass and invoke Metadata Menu.
You should see two fields (plus fileClass depending on settings): someOtherProperty and myObject.
Desired Outcome
I'd like to have happen is for Metadata Menu to treat myProperty and myObject.myProperty as two unique fields, not one that overrides the other.
Considerations
I suspect this is a bit of a pain since all of these properties are defined without explicitly hierarchy and are only treated like they have hierarchy by using the path property in the fileClass definition but you do have the logic to allow for two fields with the same name to coexist in a single fileClass, just not in inherited field.
To extend the earlier example, if I create another myProperty field on the root of childFileClass, Metadata Menu treats them as unique:
Issue
While this is definitely the preferred behavior I did find a case where this may have an unintended effect when using objects.
parentFileClass
and definemyProperty
and `someOtherProperty.childFileClass
and extendparentFileClass
.myObject
field onchildFileClass
.myProperty
field and set its parent tomyObject
.childFileClass
and invoke Metadata Menu.You should see two fields (plus fileClass depending on settings):
someOtherProperty
andmyObject
.Desired Outcome
I'd like to have happen is for Metadata Menu to treat
myProperty
andmyObject.myProperty
as two unique fields, not one that overrides the other.Considerations
I suspect this is a bit of a pain since all of these properties are defined without explicitly hierarchy and are only treated like they have hierarchy by using the
path
property in the fileClass definition but you do have the logic to allow for two fields with the same name to coexist in a single fileClass, just not in inherited field.To extend the earlier example, if I create another
myProperty
field on the root ofchildFileClass
, Metadata Menu treats them as unique:Environment
Obsidian 1.5.8 Metadata Menu 0.8.4