On Oct 2, 2012, at 4:29 PM, George Sakkis wrote: > I had the impression that the Session’s unit of work figures out > automatically the potential object dependencies and makes sure that > the insertion order is consistent to a topological sort but apparently > I misunderstood. I posted https://gist.github.com/3822855 as an > example. > > In the first case (object_lists = [authors, books]), first a bunch of > Authors is committed and then a bunch of Books. As expected this > always succeeds. The next two cases though where authors and books are > commited at once may or may not succeed. Why it doesn't use the > topological sort of the tables and why it is not deterministic?
on a quick glance I see no usage of relationship(). The topological sort is based on the relationship() paths built between mappers, not the foreign keys. -- 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.
