#16055: Filtering over generic relations with TextField/CharField object_id
breaks
in postgres
--------------------------------------+------------------------------------
Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.contenttypes | Version: 1.3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Simon Charette):
Note that another elegant solution to this problem could be to add support
to transforms to `ForeignObject.to_fields` and `.from_fields` so you could
do something along these lines
{{{#!python
class Animal(models.Model):
name = models.TextField()
tags = generic.GenericRelation(Tag, from_field='id__text')
}}}
(assuming we'd register a `__text` lookup for `IntegerField`)
--
Ticket URL: <https://code.djangoproject.com/ticket/16055#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.3383956da56fba37eaa952930decdec8%40djangoproject.com.