Currently, the translation tables e.g pokemon_names monkey-patch the created tables to poked.db.multilang. This can cause a lot of problems. i.e. if someone were to pickle an instance, this will happen
It would be more efficient if the tables for translations were built-in to the module that creates the schema.
An example would be:
pokemon_species = create_translation_table(
'pokemon_species_names',
PokemonSpecies, 'names',
relation_lazy='joined',
name = Column(
Text,
nullable=True,
index=True,
doc=u"The name",
info=dict(format='plaintext', official=True, ripped=True)),
genus = Column(
Text,
nullable=True,
doc=u'The short flavor text, such as "Seed" or "Lizard"; usually affixed with the word "Pokémon"',
info=dict(official=True, format='plaintext')),
)
Currently, the translation tables e.g pokemon_names monkey-patch the created tables to
poked.db.multilang
. This can cause a lot of problems. i.e. if someone were to pickle an instance, this will happenIt would be more efficient if the tables for translations were built-in to the module that creates the schema.
An example would be: