le 07.09.2007 19:47 remi jolin a écrit:
> le 07.09.2007 19:27 Michael Bayer a écrit:
>
>> numeric types are going to come out using decimal.Decimal objects in
>> 0.4 but not exactly sure whats happening there...do a repr(m.price).
>>
>>
>>
> it gives Decimal("10.00")
>
> and I'm using SA 0.3.10
> Is there a difference regarding Numeric between 0.3.7 and 0.3.10 because
> the system where I have sqlite DB is using 0.3.7 ??
>
I've just tested with 0.3.10 and sqlite : repr(m.price) gives 10.0 so it
is not a difference due the SA versions but only DB access implementation.
>> On Sep 7, 2007, at 12:57 PM, remi jolin wrote:
>>
>>
>>
>>> Hello,
>>>
>>> I have the following definition (using Elixir)
>>> class Manifestation(Entity):
>>> has_field('price', Numeric)
>>> The DB is mysql
>>>
>>> and something like
>>> m = Manifestation(price=10.0)
>>>
>>> then when accessing to this manifestation again (after flush,
>>> clear, etc...)
>>> I have this strange behavior
>>>
>>>
>>>>>> m.price > 10
>>>>>>
>>>>>>
>>> False
>>>
>>>
>>>>>> m.price > 10.0
>>>>>>
>>>>>>
>>> True
>>>
>>>
>>>>>> m.price > 12.34
>>>>>>
>>>>>>
>>> True
>>>
>>> The same definition works great when using a sqlite DB.
>>> Any idea ?
>>>
>>>
>>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---