On Sat, Mar 13, 2010 at 08:14:46PM -0500, Michael Bayer wrote: > > On Mar 13, 2010, at 6:45 PM, Christoph Ludwig wrote: > > > Hi, > > > > I have an application that used to work fine with SQLAlchemy > > 0.5.6. With 0.6beta1 I observe commit failures when I try to update > > references in a 1-to-many relationship and delete the then unreferences > > object. I did not see anything pertinent to this issue in the 0.6 > > migration guide. > > this is a bug, and the pertinent area of change is that described in > http://www.sqlalchemy.org/trac/wiki/06Migration#Many-to-oneEnhancements . > The first line there which mentions no longer fetching the "old" value is a > feature which needed to be partially rolled back to fix this, as what is > special about your test is that your foreign key is against a non-primary key > column (its only UNIQUE). When the "old" value is present in the current > session, it is in fact needed for the backref accounting to work correctly, > but for all our current tests this apparently has been relying upon the "old" > value identified by primary key and therefore available via the local > identity map. So if the relation can't use a simple get() it has to go > back to the database. > > The test is pending and the ticket is #1737, however I have already committed > the actual fix in r502f1a4f92d5 - the latest is available from mercurial or > the development links at http://www.sqlalchemy.org/download.html . thanks > for the full test case. > >
a late "thank you" for the swift confirmation and fix! Cheers, Christoph -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@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.