Re: Exclusion by a many-to-many field to self

2006-06-29 Thread Russell Keith-Magee
On 6/29/06, Mikko Nylén <[EMAIL PROTECTED]> wrote:   Hand writing the SQL might work, though, I would need to hand-write the whole query, including other filters, and turn the results manually as Color objects. How exactly would "where/tables clauses in a filter" you mentioned work?The full detail

RE: Exclusion by a many-to-many field to self

2006-06-29 Thread Mikko Nylén
  From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Russell Keith-Magee Sent: 29. kesäkuuta 2006 5:22 To: django-users@googlegroups.com Subject: Re: Exclusion by a many-to-many field to self     On 6/28/06, Mikko Nylén <[EMAIL PROTECTED] > wrote: I've

Re: Exclusion by a many-to-many field to self

2006-06-29 Thread Ivan Sagalaev
Ivan Sagalaev wrote: > This change might lead to some well hidden bugs. If someone was > deliberately using the behavior of join that doesn't get records that > don't have their related counterparts then those queries would suddenly > yield much more results than they used to. To clarify... I

Re: Exclusion by a many-to-many field to self

2006-06-28 Thread Russell Keith-Magee
On 6/29/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: Russell Keith-Magee wrote:> Interesting... this could be interpreted as a bug in exclude(). It might> be worth checking to see if this has been identified before, and if not,> raising this as a bug. Sounds like it could be a problem with a join >

Re: Exclusion by a many-to-many field to self

2006-06-28 Thread Ivan Sagalaev
Russell Keith-Magee wrote: > Interesting... this could be interpreted as a bug in exclude(). It might > be worth checking to see if this has been identified before, and if not, > raising this as a bug. Sounds like it could be a problem with a join > that should be OUTER, but is LEFT INNER (or s

Re: Exclusion by a many-to-many field to self

2006-06-28 Thread Russell Keith-Magee
On 6/28/06, Mikko Nylén <[EMAIL PROTECTED] > wrote: I've tried this:Color.objects.exclude(similar_colors__the_color__startswith="..."), and italmost works. However, the problem is, it doesn't give the Colors whichdon't have any Colors in similar_colors. I need to get these as well. Interesting...