#11938: `to_field` does not function as expected. ------------------------------------------+--------------------------------- Reporter: dcramer | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.1 Keywords: to_field | Stage: Unreviewed Has_patch: 0 | ------------------------------------------+--------------------------------- In lookups involving a `ForeignKey`, or a `ManyToMany` intermediary table using a `to_field` they fail due to looking for the primary key, rather than the field specified by `to_field`.
For example: {{{ user = models.ForeignKey(User, to_field="username") # Fails SimpleModel.objects.get(user=self.user) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/11938> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---