Hello all,
it would be useful (and more clear) if we could define a synonym on a
subclass.
a little example:
we have a Person class identifying all persons on system
class Person(Entity):
name = Field(Unicode(30))
nickname = Field(Unicode(30))
primary_mail = Field(Unicode(200))
and we have a class identifying just the users... something like
class User(Person):
user_name = Field(Unicode(30))
real_name = Field(Unicode(30))
email_address = Field(Unicode(30))
password = Field(Unicode(12))
but in this class we could be use the name and nickname instead of
create two new columns
the class should look like
class User(Person):
user_name = Synonym(Person.nickname)
real_name = Synonym(Person.name)
email_address = Synonym(Person.primary_address)
password = Field(Unicode(12))
so we could put a synonym for any parent class in this class.
than you can ask me why to create this behavior.
well, at moment I needed this feature because I am using turbogears,
and I have my own (complex) person structure, and I want to subclass
the Turbogears User class from my person class. but the framework expect
the field names that Turbogears User class have.
for now, I will put the synonym at my person class, but I think that
User class is the best place to put that synonyms.
Thanks for advance
att,
--
Alexandre da Silva
Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007)
--
Alexandre da Silva
Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---