I am researching several ODMs for our project.
First of all: project documentation on this topic is really bad, also code documentation and comments are missing.
I have found hints at https://github.com/behackett/presentations/tree/master/pycon_2012 (which seems outdated) and in the unit tests.
I attach a pytest unit test which shows my assertions.
Problem: if I query a subclass for all instances with
find, I get also the instances from the superclass
Expectation: I get only those instances, which belong to my subclass
Problem: if I query one instance from the subclass with
get, I get the instance from the superclass
Expectation: I get the instance from the subclass
Generally it seems that I have always to add
kind=<polymorphic_identity> to get it right, but that would mean, that I have to take care of the inheritance chain and make as many queries as subclasses are defined. Such things I would expect the ODM to resolve.
Since the documentation is so sparse, it is also possible that I am totally wrong, so I ask you to point me in the right direction.