Hi.
It would be great if MongoFrame implements also a check of field type/structure.
Let me say I want to have all the documents of a certain type with the same _id structure:
class Test(Frame):
_db = 'testdb'
_collection = 'testcollection'
_fields = {
'_id': {
'template': 'test_id_'
'type': str
},
so when I create a new Test class, i could do the following:
and the result _id will be "test_id_1234"
In this way it's more simple also to document the structure of the document.
Let me know if this could be in the philosophy of MongoFrames or it's better to use an external validator. In the latter case, any advice?
Thanks
Hi.
It would be great if MongoFrame implements also a check of field type/structure.
Let me say I want to have all the documents of a certain type with the same _id structure:
so when I create a new Test class, i could do the following:
and the result _id will be "test_id_1234"
In this way it's more simple also to document the structure of the document.
Let me know if this could be in the philosophy of MongoFrames or it's better to use an external validator. In the latter case, any advice?
Thanks