Thanks, that looks like pretty much the thing I need.

Although, as a note, I mostly define my relationships in the opposite
direction than then example in the documentation; That is, I define a
"order" relationship in the Item model, with a "items" backref, which
I suppose is just a question of preference. Unless I'm missing
something though, this currently requires me to use cascade_backref
like so:

order = db.relationship(Order,
        backref=db.backref('items',cascade_backrefs=False))

I.e. it's a slight brain twister, the backref of the backref meaning
the relationship being defined. Just throwing this out there, in case
someone thinks adding another argument which could be passed to
relationship() in a case like mine might be appropriate.

Michael

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to