On Tue, Jan 6, 2009 at 1:21 AM, Alex Gaynor <alex.gay...@gmail.com> wrote: > The one's that are a result of Oracle not returning a Decimal can be solved > be inserting "..." before and after the number, in placeess of explicitly > saying Decimal(unless of course this is actually a typecasting issue in > Django itself, in which case that should be fixed) this is done a few other > places in aggregates regress.
The '...' change hides the problem, but doesn't fix it. Sum('price') should return a decimal, since it is a non-computed, non-ordinal aggregate over a decimal field. Max(closing_time) should return a datetime.time(), not a datetime.datetime() - this looks like an error in the Oracle backend. The real solution for these problems is to write a backend-specific coerce_aggregate_value() function as part of the DatabaseOperations class. SQLite has one for exactly this purpose (and for exactly the same data types). The SQL errors are slightly more problematic - I'll need to defer to someone with Oracle-fu for suggestions on the fix. Russ %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---