On Wed, Nov 15, 2006 at 11:46:04AM +0100, Francois Visconte wrote: > class nodeProperties(SQLObject): > class sqlmeta: > fromDatabase = True > table = "nodeProperties" > style = MixedCaseStyle() > > np = nodeProperties( hostname="faro" ) > ---------- > File > > "/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/col.py", > line 966, in from_python > (self.name, type(value), value), value, state) > Invalid: expected a datetime in the DateTimeCol 'expiryDate', got <type > 'str'> '1000-01-01 00:00:00' instead
Aha, I see. The bug is a result of fromDatabase+string default values from MySQL. DateTimeCol expected a datetime object, but fromDatabase gave it a string. The bug certainly related to the bug http://sourceforge.net/tracker/index.php?func=detail&aid=1414773&group_id=74338&atid=540672 so IWBN if someone cleans up and extends the patch there and adds tests. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
