[Modeling-users] SQLite, problemas with Floats
Status: Abandoned
Brought to you by:
sbigaret
From: Ernesto R. <er...@si...> - 2003-09-16 23:26:14
|
Hi again (sorry for the attack), I'm using Modeling 0.9-pre15 and sqlite 2.8.6 When I do a fetch for objects with float attributes, these are string = and not float. Say: .... >>> accounts=3Dec.fetch('Account') >>> accounts[0].getAmount() '0.0' I know that sqlite stores everything as strings, but it should be = converted to float in Python, and I don't know where to do this. The = problem is (suppose account has a name): >>> accounts[0].setName('sales') >>> ec.saveChanges() .... Modeling.Validation.ValidationException: Validation for key saldo = failed: - Wrong type Validation for key OBJECT_WIDE_VALIDATION failed: - Validation of object <Conta.Cuenta.Cuenta instance at 0x00DC4FE8> as a = whole failed because although it has been initialised with 0.0 now it is '0.0' (type = string). Thanx in advance, Erny |