On Thu, Apr 17, 2014 at 5:28 PM, Mats Nordgren <[email protected]> wrote:
> When I add the relationship below it displays the relationship list without
> issuing a commit.
>
>>>> session.add(Relationship(source=george, target=martha,
>>>> relationship_type=marriage))
>>>> george.relationships
> [<Relationship "Washington, George & Washington, Martha (Marriage)">]
>
> But when I add this relationship it returns an empty list unless I issue a
> session.commit() somwhere
> between george.relationship and martha.relationships.  Why do they not
> behave the same?
>
>>>> session.add(Relationship(source=martha, target=george,
>>>> relationship_type=marriage))
>>>> martha.relationships
> []
>
>>>> session.commit()
> [<Relationship "Washington, Martha & Washington, George (Marriage)">]
>

What do your mappings look like for the classes in question?

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to