I gave up and did it a slightly harder way...just wish I would have thought of it sooner :)
I used sets.Set to create a list of tests matching the criteria and then used its intersection function to get the primary keys of those tests. It works o.k, but it just feels like I'm having to use the sets to workaround a bug...oh well...Not complaining too much, I've loved django since I found it. On Oct 29, 5:17 pm, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > On 29.10.2007, at 22:08, Kevin wrote: > > > I've tried some of the Q stuff, and that is probabbly where my answer > > lies, but I can't quite figure it out. I believe the example you > > provided would return a test that has either 1024 or 2048 not one test > > that has both. > > > models.TestLine.objects.get( Q(dimm__size=1024) | Q(dimm__size=2048) ) > > Ah ok, I see. Perhaps you need to look into the extra() functionality? > I don't know > if you can compose this query with the builtin queryset methods. > > I think I'd use custom sql to get a list of matching TestLine IDs, but > I have to admit > that I don't know django too well (yet) > > --http://spinlock.ch/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

