How can I stipulate a document ref in a structure when the document isn't yet declared?

7 views
Skip to first unread message

Matt Bodman

unread,
Jun 30, 2014, 1:09:22 AM6/30/14
to mong...@googlegroups.com
Hi, I'm sure this is a common problem.  It is dealt with in other MongoDB ODM's but I wish to do it in MongoKit.  Consider this example:

class User(Document):
    structure = dict(
        first_name=basestring,
        modified_by=User  # User is not yet defined
        )

Is it possible with MongoKit to to this kind of reference?

Cheers.
Reply all
Reply to author
Forward
0 new messages