I just ran across something I believe maybe a bug in session.refresh() dealing with adjacency lists. The situation is after a session.refresh() on a node (in my case a 'job'), the children and grandchildren have some of their values overridden by the refreshed node. Calling session.expire_all() fixes this.
Also in this case I am using joined table inheritance, and fields in question are in the base table. Unfortunately I haven't been able to come up with a simple example that isn't based on my schema. >>> from asset.farm.farmdb import * >>> session=create_session() >>> job=session.query(Job).get('testshow/201/s22/t04/lgt/cA') >>> type(job) <class 'asset.farm.farmdb.CamJob'> >>> type(job.Children[0]) <class 'asset.farm.farmdb.CmpJob'> >>> type(job.Children[0].Children[0]) <class 'asset.farm.farmdb.PassJob'> >>> job.end_frame 2063.0 >>> job.Children[0].end_frame 25.0 >>> job.Children[0].Children[0].end_frame 25.0 >>> session.refresh(job) >>> job.end_frame 2063.0 >>> job.Children[0].end_frame 2063.0 >>> job.Children[0].Children[0].end_frame 2063.0 >>> type(job.Children[0]) <class 'asset.farm.farmdb.CmpJob'> >>> session.expire_all() >>> job.Children[0].end_frame 25.0 >>> job.Children[0].Children[0].end_frame 25.0 >>> -- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---