Ability to add and handle index in JSON documents even though hierarchy has been added #2120
Unanswered
tedekeroth
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The ability to use hierarchies i Marten is great, but there are a few issues with it, one I would like to address here:
When an hierarchy is added in code, Marten then use the base class as the table, and all objects that are children of that base class is persisted into the same table. If there for example is this structure:
CoreObject-->Actor-->Customer
, and I add hierarchy, like this:all objects will be in the folder
mt_doc_coreobject
(which I would prefer not be the case, but that is another question).The problem is that I can no longer, using Marten, create indexes in the JSON document that is of any of the subtypes; only on the basetype
CoreObject
, which in most cases isnt very good. There are for exampleUsername
in theActor
class, and aPopulationRegNbr
in theCustomer
class that would need to be indexed:So, I discussed ni the gitter chat with Jeremy Miller, and he suggested that I add this missing functionality as a feature request here on GitHub:
Suggestion: To support creating indexes for properties inside a JSON document when Marten has a hierarchy added, thus storing a number of different types in the same table.
With Regards,
Ted
Beta Was this translation helpful? Give feedback.
All reactions