Re: [SQLObject] bug with sqlmeta.idName and non autoincrement primary keys?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Vladimir B. <vla...@gm...> - 2005-11-09 16:23:58
|
Hi, we have moved the debug line to 1207. Also added the debug=3D1. This is what we get now on the output: 1/QueryAll: SHOW COLUMNS FROM person 1/Select : SELECT person.person_id, person.person_id, person.name FROM person WHERE 1 =3D 1 kw['personID'] =3D 6, type =3D <type 'str'> 1/Select : SELECT person.person_id, person.person_id, person.name FROM person WHERE 1 =3D 1 {'personID': <SOIntCol personID default=3D'6' not null>, 'name': <SOStringCol name default=3D'' not null>} kw['personID'] =3D 6, type =3D <type 'str'> (as you can see we have also added a debug line in dbconnection.py to see the default value type for personID: def _SO_selectOne(self, so, columnNames): =09print so.sqlmeta.idName, self.sqlrepr(so.id) ) On 11/9/05, Oleg Broytmann <ph...@ph...> wrote: > On Wed, Nov 09, 2005 at 05:04:10PM +0100, Vladimir Blagojevic wrote: > > we have added a print statement in the > > 'set' method (line 1064) > > > > print "kw['personID'] =3D %s, type =3D %s " % (kw['personID'], > > type(kw['personID'])) > > > > We have also changed the database schema to use 6 as a default for > > person_id. This is what we get on console: > > > > kw['personID'] =3D 6, type =3D <type 'str'> > > Well, let's to continue. Please add a debuging output at line 1207, > right before the call to set(). > Also add "?debug=3D1" to your connection string. What is the output? T= here > should be an INSERT with the proper person_id... > > Oleg. > -- > Oleg Broytmann http://phd.pp.ru/ ph...@ph... > Programmers don't die, they just GOSUB without RETURN. > |