You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binding a pokemaster.pokemon.Pokemon object to a db session couples the class with a db schema, and having them completely separated is much preferred.
But if we remove this class var, how can properly instantiate a pokemaster.pokemon.Pokemon instance?
E.g., how do we get the correct database for the following helper class method?
I think, we should keep all the database mess in pokemaster.query module, including the (only) function, pokemaster.session.get_session(). If we need to change the db, use pokemaster.query.bind_session().
kipyin
changed the title
Pokemon class should not bind to a sessionpokemaster.pokemon.Pokemon should not bind to a session
Jan 4, 2019
pokemaster/pokemaster/pokemon.py
Lines 29 to 33 in 80a839d
Binding a
pokemaster.pokemon.Pokemon
object to a db session couples the class with a db schema, and having them completely separated is much preferred.But if we remove this class var, how can properly instantiate a
pokemaster.pokemon.Pokemon
instance?E.g., how do we get the correct database for the following helper class method?
pokemaster/pokemaster/pokemon.py
Line 301 in 80a839d
The text was updated successfully, but these errors were encountered: