[sqlalchemy] Session is commiting without an add()

2015-06-10 Thread Gilcan Machado
Hi. I'm dealing with a weid situation: My 'session' is loaded with objects, and when I commit all the objects are saved in the database, but without any execution of add() method. How is this possible. It's a problem to me because I'm creating a lot of objects and return it as a list to

Re: [sqlalchemy] Session is commiting without an add()

2015-06-10 Thread Gilcan Machado
Ok. Here's a code as an example of my situation: First, the file ormdb.py: db = create_engine('mysql+mysqlconnector://root:password@localhost/debug',paramstyle='format') db.echo = False Base = declarative_base() source_databases = Table('source_databases', MetaData(bind=None)) person

Re: [sqlalchemy] Session is commiting without an add()

2015-06-10 Thread Gilcan Machado
I'll try to isolate the code and put here. Em quarta-feira, 10 de junho de 2015 16:02:45 UTC-3, Gilcan Machado escreveu: Is worse than that. I simply don't use the add() method in any line. There's no add() method being executed. But a commit() saves all the objects in the database.

Re: [sqlalchemy] Session is commiting without an add()

2015-06-10 Thread Mike Bayer
On 6/10/15 2:22 PM, Gilcan Machado wrote: Hi. I'm dealing with a weid situation: My 'session' is loaded with objects, and when I commit all the objects are saved in the database, but without any execution of add() method. How is this possible. It's a problem to me because I'm creating a

Re: [sqlalchemy] Session is commiting without an add()

2015-06-10 Thread Gilcan Machado
Is worse than that. I simply don't use the add() method in any line. There's no add() method being executed. But a commit() saves all the objects in the database. Seems that sqlalchemy is executing add() method in background... []s Gil Em quarta-feira, 10 de junho de 2015 15:44:06 UTC-3,