Hi, I am trying to create an orm setup like in ruby on rails with the DAL. I have a user, post, and tag model. A user has many posts. A tag belongs to a user. A post has and belongs to many tags. A tag has and belongs to many posts.
I have 4 separate files in my models folder: db.py, user.py, post.py, and tag.py db.py contains the db connection and mail configurations. The respective model files define the table structure and have a class named after the model to implement virtual fields. I noticed that defining the tables with relationships in the separate files does not work properly. The model files would load which appears to be in alphabetical order. So, my db.py would load first and then post.py which fails. post.py fails to recognize the table definition in user.py, so it cannot define the belongs to relationship. Is their anyway to setup a model file to import all the other models without the hassle of file load order and possibly import order which rails does implicitly?