Hi,
I hope sombody can help me whit this.
I've the next table, for instance:
customer = Table('customer', metadata,
Column('id', Integer, primery_key=True),
Column('name', String(50), nullable=False)
)
and....the class
class Customer(object):
pass
and.. the mapper
mapper(Customer, customer)
Now, I want add a "virtual attribute" to my class which is not part of
my table, for example
class Customer(object)
def __init__(self)
self.selected = False
Then, I do a simple query:
cust = session.query(Customer).get(1)
but, when I want use....
cust.selected = True
An exception ocurr, the cust object have not 'selected' attribute
How can solve this?
Is possible do it?
Than in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---