Hello all,
I would like to know your opinion about deprecation of using "pk" alias in filters and other places of public ORM API. I use Django long time and never use "pk" because in my opinion it is misleading. I mean, instead: Car.objects.filter(pk=1) I use Car.objects.filter(id=1) Insted car.pk I use car.id >From SQL point of view it doesn't matter because it is always: SELECT * FROM car WHERE id=1 It am not sure if using "pk" gives value to users. Field "pk" is not defined by user. But from our, django developers, point of view we need to do extra work to support it. I think that "pk" could be only a private attribute of a model ("_pk") and only for internal use or avoid using it at all. I think it would give us more flexibility to develop/improve orm. What do you think? Regards, Albert Defler -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/degsdbrykkgpmlzcetdx%40khjm.