Thank you all for your help. For now i just removed the "ALLOW NULL" on the fields and placed default values.
I have another question but ill post this in a new "thread" because it's not related. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146 -----Ursprüngliche Nachricht----- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Tom Evans Gesendet: Montag, 04. Juli 2011 11:53 An: django-users@googlegroups.com Betreff: Re: unique_together doesn't work On Mon, Jul 4, 2011 at 10:43 AM, Szabo, Patrick (LNG-VIE) <patrick.sz...@lexisnexis.at> wrote: > Hi, > > Sry, i was a little bit unclear. > Of course i tried to store identical entries (all fields have the same > values) and i had no problem doing so. Since most of the files i want to > check for can be null i only inputet a titel. > > It might have been nice for you to give this example straight up (although you haven't actually specified the case clearly, I'm still just guessing). So you are creating objects, and 3 of the fields that you have said are unique_together are undefined, and have Null=True in their field definition? In databases, NULL is not equal to anything, even NULL. Eg, NULL == NULL is false. Therefore, 2 rows in the database with the same title, but with NULL for the other 3 fields in the unique index, would not be considered as the same row. Tom -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.