Tefnet Developers schrieb:
> The funny thing is that it works on two separate classes.

I don't think so. As Michael already pointed out, these things are 
tested in test/orm/test_backref_mutations.py. The situation in your 
example is covered by test_collection_move_preloaded(), except that it 
uses two different classes instead of a self-referencing relation, and 
the test presumes the same behavior you were experiencing.

You can translate the test objects to the objects in your example:

   user -> manager, addresses -> subordinates,
   u1 -> BillGates, u2 -> SteveBallmer, a1 -> CraigMundie

The test explicitely checks

      a1 in u1.addresses

i.e. in your example

     CraigMundie in BillGates.subordinates

So this behavior is in fact intended by SQLAlchemy. As Mike explained, 
this is because propagating events further than the 2 objects directly 
involved would become too complex, possibly leading to recursion and 
performance issues.

@Mike: The test code says in a comment "flushing at this point means its 
anyone's guess". Can you elaborate what is meant by this comment?

-- Christoph

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