I'v got a situatio in wich it seems that execute changes the value of an
attribute from int to None. Which can be the cause?
engine = create_engine("postgres://sandro:[EMAIL PROTECTED]:5433/eurotex")
t = engine.text(
"""INSERT INTO art_var_filo (f_id, fa_id, avct_id)
VALUES ( :f_id, :fa_id, :avct_id)""")
params = {
'fa_id' : 51,
'acvt_id' : 36,
'f_id' : 7,
}
print 'params', params
print t
engine.echo = True
t.execute(**params)
engine.echo = False
------
params {'fa_id': 51, 'acvt_id': 36, 'f_id': 7}
INSERT INTO art_var_filo (f_id, fa_id, avct_id)
VALUES ( %(f_id)s, %(fa_id)s, %(avct_id)s)
[2006-09-10 15:00:39,945] [engine]: INSERT INTO art_var_filo (f_id, fa_id,
avct_id)
VALUES ( %(f_id)s, %(fa_id)s, %(avct_id)s)
[2006-09-10 15:00:39,945] [engine]: {'fa_id': 51, 'f_id': 7, 'avct_id': None}
[2006-09-10 15:00:39,952] [engine]: COMMIT
You clearly see that avct_id has tuned from 36 to 'None'. It happens in
execute_compiled:
[compiled.get_params(**m) for m in self._params_to_listofdicts(*multiparams,
**params)]
responsible for this is compiled.get_params but I cannot absolutely
understand why shold it....
Any help is appreciated
sandro
*:-)
PS: inserting direcly indo the db via psql works just ok.
--
Sandro Dentella *:-)
e-mail: [EMAIL PROTECTED]
http://www.tksql.org TkSQL Home page - My GPL work
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users