mongoengine
mongoengine copied to clipboard
Inspect Db
Write a script to inspect a collection to create a model definition.
Problems will be the same field names containing mixed content ..
Oh yeah.. It is a big problem for me. For example. model field type change.
Today:
class Product(Document):
name = StringField()
category = String() # Simple
Tomorrow :
class Product(Document):
name = StringField()
category = ListField(ReferenceField(Category)) # Changed to Complex !!!!!. Old data convert is big problem
etc...
Misapplied the patch