Am 14.11.2011 um 16:20 schrieb alex bodnaru: > On 11/14/2011 09:40 AM, Diez B. Roggisch wrote: >> >> Am 13.11.2011 um 19:48 schrieb alex bodnaru: >> >>> >>> hello diez, other friends, >>> >>> thanks a lot for your consideration. >>> >>> On 11/13/2011 08:11 PM, Diez B. Roggisch wrote: >>>> >>>> Is it possible that you have declared models in different sessions? This >>>> has cause me similar issues >>>> before. It means essentially that you have two connections open, for each >>>> session. And commits over the middleware only affect one of them. >>>> >>> i have, deep in my heart, a similar suspicion, but no idea of a way to >>> check it. >>> indeed, the same db user is making other connections as well from another >>> site >>> program. >>> but these kept occurring when i run ddl and dml successfully through sa, >>> even >>> with the same model, but not through tg controllers. >>> >>> moreover, my failing code is successfully doing a select before it attempts >>> to >>> update and fails. before trying to update, i tried some ddl without select, >>> but >>> with the same failure. >>> >>> any idea of a way i could check your suspicion? >> >> >> Not really - deep debugging it is. Try reducing to a minimal working (or not >> working...) example. Debug the commit()-call from TW. Try & see where object >> state is kept, by session. > do you mean i should check whether the session being committed in > transaction.commit() is DBSession?
Or that the objects that don't get committed aren't part of DBSessien. Something like that. It's impossible to tell anything from here, without having a non-working example. > did you suggest there's debugging functionality in toscawidgets (TW). any > document for that? Nope, there is just the PDB. Familiarze yourself with it, if you haven't. import pdb; pdb.set_trace() is your friend. Diez -- You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en.

