﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20271	Filtering over generic relations with TextField/CharField object_id gives PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.	arctelix@…	nobody	"It seems this error is still around!
{{{
Traceback (most recent call last):

  File ""/app/.heroku/src/django-tastypie/tastypie/resources.py"", line 202, in wrapper
    response = callback(request, *args, **kwargs)

  File ""/app/.heroku/src/django-tastypie/tastypie/resources.py"", line 441, in dispatch_list
    return self.dispatch('list', request, **kwargs)

  File ""/app/.heroku/src/django-tastypie/tastypie/resources.py"", line 473, in dispatch
    response = method(request, **kwargs)

  File ""/app/.heroku/src/django-tastypie/tastypie/resources.py"", line 1244, in get_list
    to_be_serialized = paginator.page()

  File ""/app/.heroku/src/django-tastypie/tastypie/paginator.py"", line 186, in page
    count = self.get_count()

  File ""/app/.heroku/src/django-tastypie/tastypie/paginator.py"", line 118, in get_count
    return self.objects.count()

  File ""/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py"", line 351, in count
    return self.query.get_count(using=self.db)

  File ""/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py"", line 418, in get_count
    number = obj.get_aggregation(using=using)[None]

  File ""/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py"", line 384, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)

  File ""/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py"", line 818, in execute_sql
    cursor.execute(sql, params)

  File ""/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py"", line 52, in execute
    return self.cursor.execute(query, args)

DatabaseError: operator does not exist: integer = text LINE 1: ... INNER JOIN ""django_comments"" ON (""pins_pin"".""id"" = ""django_...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
}}}"	Bug	closed	Database layer (models, ORM)	dev	Normal	duplicate	postgresql, pk	shanto@…	Accepted	0	0	0	0	0	0
