Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make available an option to automatically import all the DeclarativeBase subclasses into model package #35

Closed
amol- opened this issue Feb 15, 2013 · 4 comments
Milestone

Comments

@amol-
Copy link
Member

amol- commented Feb 15, 2013

No description provided.

@pedersen
Copy link
Member

While the title is intriguing, I'm not sure how to achieve the goal. What are the plans for accomplishing this?

@amol-
Copy link
Member Author

amol- commented Feb 16, 2013

No plan yet, it was more like a remainder as I received the request and thought it's not a bad idea.
We can make available an option in app_cfg.py, when enabled it will just import all modules inside the model package and check for DeclarativeBase subclasses. Somehow like what we do for jinja filters loading.

@csmall
Copy link

csmall commented Feb 16, 2013

Would this solve the circular dependency nightmare I have with the model
objects? Alternatively, how would you not trigger that yourself?

@amol-
Copy link
Member Author

amol- commented Feb 17, 2013

@csmall Usually SQLAlchemy makes possible to use strings with the class name whenever the class should be used to declare references or foreign keys. This avoids circular dependencies in such cases.

@amol- amol- closed this as completed Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants