X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/1d789e2e9e790f11246e09d7ea17ececb4253af0..095fdd7d58c012cbe6345d369d00c26b8159e935:/pokedex/db/multilang.py diff --git a/pokedex/db/multilang.py b/pokedex/db/multilang.py index 7e2840f..f66ee20 100644 --- a/pokedex/db/multilang.py +++ b/pokedex/db/multilang.py @@ -48,7 +48,7 @@ def create_translation_table(_table_name, foreign_class, relation_name, are rows in the created tables. - `(relation_name)_local`, a relation to the row in the new table that matches the current default language. - - `(relation_name)_class`, the class created by this function. + - `(relation_name)_table`, the class created by this function. Note that these are distinct relations. Even though the former necessarily includes the latter, SQLAlchemy doesn't treat them as linked; loading one @@ -99,8 +99,7 @@ def create_translation_table(_table_name, foreign_class, relation_name, 'foreign_id': synonym(foreign_key_name), 'local_language': relationship(language_class, primaryjoin=table.c.local_language_id == language_class.id, - innerjoin=True, - lazy='joined'), + innerjoin=True), }) # Add full-table relations to the original class