I pulled out non ascii characters, but anyway, how strange it is: >>> Osoba.objects.all() [] >>> Subjekt.objects.all() [] >>> gama = Subjekt(nazov = u"Gama s.r.o", osoba = Osoba(meno = "Ivan", priezvisko = "Zajac")) >>> gama.save() Traceback (most recent call last): ... IntegrityError: subjekty_subjekt.osoba_id may not be NULL >>> gama.osoba.save() >>> gama.osoba.id 1 >>> gama.save() Traceback (most recent call last): ... IntegrityError: subjekty_subjekt.osoba_id may not be NULL >>> # Now the magic is comming !!! >>> gama.osoba = gama.osoba >>> gama.save() >>> Subjekt.objects.all() [<Subjekt: Gama s.r.o - Zajac Ivan>]
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---