Dear Martin, a little bit disagree with your opnions. please see the code,
objalbum.save() song, created = objalbum.song_set.get_or_create(name=name, album=objalbum) That is to say, before get_or_create a song in album, the album is already exist and has an id. according to the definition of ForeignKey, song object will have a field named album_id which should be equal to album.id. So to think directly, if i want to create a new song in an existing album, the second parameters need not be specified. because objalbum knows the album_id and who will own the song. I feel here the error message 'album_id is null' is not correct. hope to discuss with you continuely. Minglei --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---

