#19018: m2m relationships with a through field don't respect types. -------------------------------------+------------------------------------- Reporter: justinlilly | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by ptone): So looking at this mostly for my own edification. A higher level place this could be checked would be `db.models.where.Constraint.process` otherwise: `db.models.fields.related.RelatedField.get_db_prep_lookup` and `db.models.fields.related.RelatedField._pk_trace` seem like the best places to tackle this. However unless a patch is pretty quick, it seems worth improving the docs, at least in the interim, to clarify that lookup values for model instances will always be converted to a simple pk value for database lookups. -- Ticket URL: <https://code.djangoproject.com/ticket/19018#comment:6> Django <https://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 https://groups.google.com/groups/opt_out.