> Yes, this seems to be the problem. The serializer doesn't currently > handle to_field as a special case. I'll work on a fix. > > However, there is another way to solve you problem. Are you sure that > you want Nation.code to be unique=True, and not primary_key=True? If > you set primary_key=True, the serializer will work as-is, and you're > not carrying around a redundant id attribute in your table.
you're totally right. primary_key=True would also be more elegant in this case. Tanks sandro *:-) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---