Hi all,

I recently had to merge 4 Pylons project together (huge pain btw, but
was needed). Now, my whole big project is going well and working, and
dealing with 4 different database. I have an issue with a piece of
code now, and I'm pretty sure it's related to my database drivers
setup using these 4 database.

Here's the deal. My piece of code that causing me some problems looks
like this (for the structure, it's kind of pseudocode hehe):




myObject = Session.query(ObjectType).filter()

for row in myObject.myList:
    #Do some actions over my object attributes
   ObjectType.flush(myObject);





Thing is... this code was working perfectly in my previous project,
but does not work properly anymore, I get some VERY random output,
like if some SQL queries were put somewhere in cache and process when
I hit F5 in my browser, like a madman... which doesn't make sense at
all. Sometimes it get update, sometime not....

I followed the little tutorial given here:
http://elixir.ematia.de/trac/wiki/Recipes/MultipleDatabases, using the
strategie "Multiple files (module)".

However, I have not been able to make fit the following lines anywhere
in the project::
a_session.commit()
b_session.commit()

nor the
   finally:
       model.a_session.remove()
       model.b_session.remove()

Would that be part of my problem ?

I also tried to play with the flush function of my entities... did
nothing, and played a lot also with the autocommit and autoflush
arguments of the session_maker() function...without anymore success.
And just to make sure, I tried, using the same database and same
controller code my previous project, and it worked perfectly.... So I
really think I messed something a little bit in my DB config in Pylon,
or I really don't know...

Would you have some ideas of what would be the problem ?

Regards,

A.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to