Re: DatabaseError: subquery has too many columns

2010-07-26 Thread gs794
query. > I'm not even sure that your approch makes sense. > > Greetings, Ogi > > >Hi all, > >Just came across this error. > >class Test(models.Model): > >  > name = models.CharField(max_length=20) > > > > >test = Test(name='bob') >

Re: DatabaseError: subquery has too many columns

2010-07-25 Thread Ogi Vranesic
s sense. Greetings, Ogi >Hi all, >Just came across this error. >class Test(models.Model): > name = models.CharField(max_length=20) >test = Test(name='bob') >test.save() >pks = Test.objects.none().values('pk').query >print Test.objects.exclude(pk__in=p

Re: DatabaseError: subquery has too many columns

2010-07-25 Thread Dennis Kaarsemaker
On zo, 2010-07-25 at 03:16 -0700, gs794 wrote: > pks = Test.objects.none().values('pk').query > print Test.objects.exclude(pk__in=pks) You're not supposed to do that. Try without the .query, and without the .values('pk'). -- Dennis K. They've gone to plaid! -- You received this message becaus

DatabaseError: subquery has too many columns

2010-07-25 Thread gs794
Hi all, Just came across this error. class Test(models.Model): name = models.CharField(max_length=20) test = Test(name='bob') test.save() pks = Test.objects.none().values('pk').query print Test.objects.exclude(pk__in=pks) DatabaseError: subquery has too many columns