On Jan 28, 1:25 pm, João Olavo Baião de Vasconcelos <joaool...@gmail.com> wrote: > I think that I realised what is the problem. > > Karen, just add a TextField to the Book model (say, "description = > models.TextField()"), try to search for something and you'll see that error > message. I'm not 100% sure about it, coz I tested this at work and then came > home. > > Probably is the same bug reported > here:http://code.djangoproject.com/ticket/4186
Yes, that's the problem. The admin automatically adds .distinct() to the queryset whenever one of the search fields is in a related model, which would trigger the error. If you drop the `author__name` field and just search over 'title', I think you'll find that it works. This is a limitation of Oracle, and there's not a whole lot we can do about it, other than to suggest you not structure your models that way. Probably your best solution will be to put the TextField in a separate one-to-one related model. If you do that, and you avoid using the `list_select_related` admin option, and you exclude the related model from the `list_display` admin option, then you should be okay. Regards, Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---