You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am pretty new to ODM's, and was starting to work with mongoengine until I started reading about beanie. I'm trying to understand how to best go about using embedded documents under this framework? In mongoengine, I had something that looked like the below (not to say that this was the right way to do it...), and I'm trying to figure out how to move to the beanie world.
class Transaction(me.Document):
""" Main Class for building & data-checking """
price = me.EmbeddedDocumentField(Price, required = True)
# Custom Details Fields
tags = me.EmbeddedDocumentField(Descrip_Tags_Class, required = True)
margin = me.EmbeddedDocumentField(Margin_Class)
# Document-Admin Fields
last_update_date = me.DateTimeField()
transaction_id = me.StringField(required = True)
document_version = me.IntField(default=1)
trade_status = me.StringField(default='live')
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am pretty new to ODM's, and was starting to work with mongoengine until I started reading about beanie. I'm trying to understand how to best go about using embedded documents under this framework? In mongoengine, I had something that looked like the below (not to say that this was the right way to do it...), and I'm trying to figure out how to move to the beanie world.
Beta Was this translation helpful? Give feedback.
All reactions