Am 13.02.2013 21:26, schrieb andrew b:
So I see how you can access the columns in one of your model objects. For example ObjectQuery.user_name to get the user_name attribute from that query object. But how do I use the relationships that I setup in my model classes? I made a class definition where I join two tables(and it worked fine, but seems wasteful if there's a better way), because I couldn't figure out how to access the relation from the table below.
You should use the ForeignKey construct. Have a look at the SQLAlchemy docs here, they explain it very well: http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#building-a-relationship
-- Christoph -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

