Kevin wrote: > models.TestLine.objects.filter(dimm__size=1024).filter(dimm__size=2048) > > This returns an empty set, but I know there is a test with multiple > dimm objects and meets this criteria. Is there a limitation that I'm > missing here? Is there an alternative method to accomplish the intent > here?
It returns an empty set because after the first filter you only have the objects with size=1024, then you are asking to filter out of that set the ones with size=2048. In SQL it would like like "WHERE size = 1024 AND size = 2048". How about something like: models.TestLine.objects.filter(dimm__size__in=[1024, 2048]) Regards Darryl
signature.asc
Description: OpenPGP digital signature

