Re: [SQLObject] Strange column type conversion
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ma...> - 2005-01-02 20:17:41
|
On Sun, Jan 02, 2005 at 11:03:40PM +0300, Oleg Broytmann wrote: > On Mon, Jan 03, 2005 at 01:22:18AM +0800, Hong Yaun wrote: > > i[0].number = '10' > [skip] > > 10 <type 'str'> > > What version are you using? The bug has been fixed in the Sunbversion > repository and the fixed version soon will be released as SQLObject 0.6.1. Sorry, I've spoken too fast. The bug was fixed only for columns that have a validator - the value is passed through fromPython() and toPython() calls. IntCol does not have from/toPython and hence doesn't convret a string value to an int. I am not sure in waht way that should be fixed. Should IntCol silently accepts strings and converts them to integers, or should it raises TypeError? Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |