Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MongoEngine/mongoengine
/ Person
Class
Person
tests/document/test_instance.py:56–63 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
54
years = IntField()
55
56
class
Person(Document):
57
name = StringField()
58
age = IntField()
59
job = EmbeddedDocumentField(Job)
60
61
non_field = True
62
63
meta = {
"allow_inheritance"
: True}
64
65
self.Person = Person
66
self.Job = Job
Callers
15
test_db_field_load
Method · 0.70
test_db_embedded_doc_field_load
Method · 0.70
test_embedded_document_to_mongo
Method · 0.70
test_save_max_recursion_not_hit
Method · 0.70
test_save_cascades
Method · 0.70
test_save_cascade_kwargs
Method · 0.70
test_save_cascade_meta_false
Method · 0.70
test_save_cascade_meta_true
Method · 0.70
test_save_cascades_generically
Method · 0.70
test_do_not_save_unchanged_references
Method · 0.70
test_data_contains_id_field
Method · 0.70
test_embedded_document_equality_with_lazy_ref
Method · 0.70
Calls
7
StringField
Class · 0.85
IntField
Class · 0.85
EmbeddedDocumentField
Class · 0.85
ReferenceField
Class · 0.85
GenericReferenceField
Class · 0.85
DateTimeField
Class · 0.85
FloatField
Class · 0.85
Tested by
15
test_db_field_load
Method · 0.56
test_db_embedded_doc_field_load
Method · 0.56
test_embedded_document_to_mongo
Method · 0.56
test_save_max_recursion_not_hit
Method · 0.56
test_save_cascades
Method · 0.56
test_save_cascade_kwargs
Method · 0.56
test_save_cascade_meta_false
Method · 0.56
test_save_cascade_meta_true
Method · 0.56
test_save_cascades_generically
Method · 0.56
test_do_not_save_unchanged_references
Method · 0.56
test_data_contains_id_field
Method · 0.56
test_embedded_document_equality_with_lazy_ref
Method · 0.56