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

Custom config __connection__ in custom model class isn't override #199

Closed
Marlysson opened this issue Oct 19, 2020 · 1 comment
Closed
Labels
bug An existing feature is not working as intended

Comments

@Marlysson
Copy link
Contributor

Marlysson commented Oct 19, 2020

If we define a connection value in custom model definition it isn't overrided in runtime:

class User(Model):
    __connection__ = 'sqlite'

I think is that in Model class point out always to default connection.

class Model(metaclass=ModelMeta):
    __connection__ = 'default'

if 'default' key is point to mysql then connection to User model will use the mysql even if the __connection__ is set to sqlite

@josephmancuso josephmancuso added the bug An existing feature is not working as intended label Oct 19, 2020
@Marlysson
Copy link
Contributor Author

Bad configuration. Is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants