MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / no_sub_classes

Method no_sub_classes

mongoengine/queryset/base.py:799–807  ·  view source on GitHub ↗

Filter for only the instances of this specific document. Do NOT return any inherited documents.

(self)

Source from the content-addressed store, hash-verified

797 return queryset
798
799 def no_sub_classes(self):
800 """Filter for only the instances of this specific document.
801
802 Do NOT return any inherited documents.
803 """
804 if self._document._meta.get("allow_inheritance") is True:
805 self._cls_query = {"_cls": self._document._class_name}
806
807 return self
808
809 def using(self, alias):
810 """This method is for controlling which database the QuerySet will be

Callers 1

test_no_sub_classesMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

test_no_sub_classesMethod · 0.64