Hi to everyone:
i have a question for you, since i haven't found the solution in the
docs.
Is there such a way to store in a extra column an information that
belongs to some property of an object?
I'll try to be clear with an example:

I have an object Person, and many linked object Addresses. So this is
a relation one to many.
An object Addres has a property "Street". One of these addres  is the
main  one for that person.
I would like to have this information stored in a column of the
person.

Basically i found something in the docs  that more or less is near
what i want:

def mydefault():
    global i
    i += 1
    return i

t = Table("mytable", meta,
    # function-based default
    Column('id', Integer, primary_key=True, default=mydefault),lt")
)

But i would like that the function that i can call belongs to the
object that i want to save,
not to generic static function.
I hope that i was clear in explaining my problem.

All the best,
Andrea

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to