I get the backwards compatibility issue, so if it cant be changed that
is understandable.
Also I simplified the issue about aggregate, I should have shown the
actual use case, to only show galleries of with videos that has been
converted.
Gallery.objects.annotate(video_count=Count('videos__flv_video')).filter
(video_count__gt=0) where videos is a m2m on gallery, so not being
able to have NULLs became a issue.
On 21 Feb, 00:43, Karen Tracey <[email protected]> wrote:
> On Fri, Feb 20, 2009 at 5:18 PM, Øyvind Saltvik
> <[email protected]>wrote:
>
>
>
> > Topic of the thread says ticket #10244.
>
> Ah, so it is, I missed that. Sorry. I'm often blind to thread titles.
>
>
>
> > On filefield being saved in the db as '' when saved from the form,
> > that makes perfect sense now.
>
> > But explicitly setting the field to None in python should store NULL
> > in the db.
>
> I think it's debatable, I can see the argument both ways.
>
> I still haven't heard any convincing case that warrants breaking backwards
> compatibility at this point, though. Right now, someone may have code that
> sets FileFields to None and uses a count of FileFields equal to empty string
> to count up "no file". (Or counts number of files by counting not equal to
> ''.) If we changed it to store NULL instead of empty string for this case,
> this existing code that counts number of "empty" files would break as soon
> as a new file was stored using the None->NULL mapping. I don't see how we
> can change this at this point.
>
> Karen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---