#5535: .get() should allow myforeignkey_id lookups
---------------------------------------------------+------------------------
Reporter: dcramer | Owner: nobody
Status: reopened | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by simon29):
* cc: rkm, simon29 (added)
Comment:
Old open ticket but still no decision here.
Convention is that myfk's raw value equivalent is myfk_id.
IMHO this is handy and should be implemented across the board, ie
filter(), get(), and get_or_create(); not just for create().
In particular, for filter(), since the superfluous join is performance
penalty enough to make it useless in many situations.
If we can reach a consensus I'll supply the patch with docs and tests.
--
Ticket URL: <http://code.djangoproject.com/ticket/5535#comment:15>
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 [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-updates?hl=en.