[orm-devel] Numeric/float prob committing (was: Introduction, thanks and a couple of comments on the 0.7 release)

Eric Walstad orm-devel@mailman.tux4web.de
Fri, 06 Dec 2002 09:20:41 -0800


Deidrich,

I think I found the problem...

in orm/columns.py at line 547:

# float point quantities
float, floatColumn = _float, _floatColumn

The "float" above must be a Python reserved word, which is resulting in 
the orm.column._float instance being committed to the database.

If I modify orm/columns.py like this:
# float point quantities
orm_float, floatColumn = _float, _floatColumn

And then I change my dbclass table definition from
"bid_price : float()"
to
"bid_price : orm_float()"

It works like a charm  :)

Thanks to the python syntax highlighting of the Kate editor for flagging 
"float" for me.

Best,
Eric.