This problem has emerged with sqlalchemy 0.5. I create a child object, then attempt to assign it to the parent object, but before I can, I get a flush error. I've created two test cases. One is Elixir- based and the other is pure sqlalchemy. I've been unable to get the pure sqlalchemy test case to reproduce the problem.
The Elixir test case: http://paste.turbogears.org/paste/27865 The SqlAlchemy test case: http://paste.turbogears.org/paste/27866 The traceback (from Elixir case): http://paste.turbogears.org/paste/27867 One might suggest an obvious workaround to assign the parent to the child instead of vice-versa, but this isn't an option in my real-world case, where the attributes are generated without knowledge of the parent (so the attribute referring to the parent is not readily known). In any case, the test case works with sqlalchemy==0.4.8, but fails with sqlalchemy>=0.5.0. I appreciate any suggestions on this matter. I bring it up here because the sa test seems to pass without any problems. I suspect the problem actually lies with SA, and if so, I would appreciate some help recreating the problem with a pure sa implementation. I've been able to work around the problem in my real-world code by caching a reference to the .attributes property before the children are created. Much obliged, Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
