On Nov 30, 5:18 pm, Jonathon Anderson <[EMAIL PROTECTED]> wrote:
> I'm on SA 0.4.0
>
> I was under the impression that you had to declare the relationship
> from both sides, and that backref was only used to update related
> objects when one side of the relation was changed. Can you point me to
> some docs for this?
we have some tutorial docs at
http://www.sqlalchemy.org/docs/04/ormtutorial.html#datamapping_relation_backref
the most specific M2M example is in the mapper config docs:
http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relation_patterns_manytomany
and the generated docstrings for relation() also have some info on
it:
http://www.sqlalchemy.org/docs/04/sqlalchemy_orm.html#docstrings_sqlalchemy.orm_modfunc_relation
but also, using 0.4.1 the config you had should raise an error which
is also a form of "documentation".
it probably wouldn't hurt to add a very explicit "Backreferences"
section to the "mapper" docs.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---