On Nov 19, 2012, at 8:10 AM, Thierry Florac wrote: > Hi, > > I'm using SQLALchemy (currently 0.7.3 in this project, also tested with > 0.7.9) with cx_Oracle-5.1.1 in a Zope3 project. > SQLAlchemy transactions are handled in two-phase with > ZopeTransactionExtension. > > My problem is quite simple : in a form, I can order several items which > updates an "index" attribute. Problem : if no ordering is done and "save" > button is clicked, I get the given "transaction does not exist" error. > If I just add a control in my form handling method to set a new index value > only if it was modified (instead of setting the attribute with the same > value), everything is fine. > > So my question is : is it normal that setting objects attributes without > changing their actual value generates this error ?
That's not a SQLAlchemy error. SQLAlchemy's Session has no linkage between its notion of a transaction and whether or not any state was changed. If you're working with a Session that hasn't accessed the database, there won't be any actual database transaction present until that happens. But that isn't an error condition. You might want to check with the zope.transaction folks as well as with whatever web framework you're using. -- 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.
