[storm] Dynamically changing OR mapping question with aliases
akira
nhytro-python at web.de
Thu Aug 9 13:01:44 BST 2007
Hi!
I have to use PostgreSQL Schemas for separating language tables, using
my mapped class, I can reassign the "__storm_table__" value to reflect
the schema that I´ll like to act on.
# code ahead
class Link(object):
__storm_table__ = "lang.links" # database lang.links
id = Int(primary=True)
name = Unicode()
all = ClassAlias(Link)
#I can do this:
Link.__storm_table__ ="links"
checking up however:
print all.__storm_table__
print Link.__storm_table__
gives me:
_1
links
Does the reassignment cascade to the table aliases?
Why does it just return the index number( the number increase per
created alias) instead of the real table name?
Is this the proper way to do this?
Thanks
More information about the storm
mailing list