Re: Problem querying M2M relationships

2006-09-08 Thread Guillermo Fernandez Castellanos

> Ok; I just re-ran the tests with SQLite, and I am getting the same problem.
>
> Poking through the bug database, it looks like you are hitting Bug #2091.
> I've updated that ticket with the details of your problem, and what I've
> been able to work out so far.
Mmm... I'm used to look in the doc, I'll have to learn to look the bug
database :-)

Thanks a lot,

Guille

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Problem querying M2M relationships

2006-09-08 Thread Russell Keith-Magee
On 9/8/06, Guillermo Fernandez Castellanos <
[EMAIL PROTECTED]> wrote:
Hi,> This seems to be correct. Perhaps it is a DB specific problem - what
> database are you using (my tests were with postgres)?I am using sqlite3, with the latest django cvs tree.Ok; I just re-ran the tests with SQLite, and I am getting the same problem.

Poking through the bug database, it looks like you are hitting Bug #2091. I've updated that ticket with the details of your problem, and what I've been able to work out so far.

Yours,Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Problem querying M2M relationships

2006-09-08 Thread Guillermo Fernandez Castellanos

Hi,

> This seems to be correct. Perhaps it is a DB specific problem - what
> database are you using (my tests were with postgres)?
I am using sqlite3, with the latest django cvs tree.

> Also; after you have executed these queries, the following:
> from django.db import connection
> print connection.queries
> will dump the exact SQL that was executed. This might be helpful in
> diagnosing the problem.
I'll do it and go back to you.

Thanks!

G

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Problem querying M2M relationships

2006-09-08 Thread Russell Keith-Magee
On 9/6/06, Guillermo Fernandez Castellanos <[EMAIL PROTECTED]
> wrote:I've checked the docs, but nothing seems to be wrong to me.Any help appreciated, thanks.
I just tried the following using your models (plus a __str__ definition): p1 = Person(name='russ')p1.save()p2 = Person(name='guillermo')p2.save()
p3 = Person(name='guido')p3.save()c1 = Class(name='Music')c1.save()c2 = Class(name='Art')c2.save()p1.classes = [c1, c2]p2.classes = [c1]p3.classes = [c2]>>>print 
Person.objects.filter(classes__id__exact=2)[, ]
>>>print Person.objects.filter(classes__name__startswith='Music')[, guillermo>]>>>print Person.objects.filter(classes__name__exact='Music')

[, guillermo>]
>>> print Person.objects.filter(classes__name__startswith='Mus')
[, guillermo>]
>>> print Person.objects.filter(classes__name__exact='Mus')
[]
This seems to be correct. Perhaps it is a DB specific problem - what database are you using (my tests were with postgres)?Also; after you have executed these queries, the following:from django.db import connection
print connection.querieswill dump the exact SQL that was executed. This might be helpful in diagnosing the problem.Yours,Russ Magee %-)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---