digglife / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

sql select generation with TextField fields (Clobs) in where clause fails, e.g. django.contrib.comments #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install django.contrib.comments
2. create a comment for some other object
3. do Comment.objects.get(object_pk = id, content_type...)

What is the expected output? What do you see instead?
to be able to retrieve the object
but instead: SQL0401N  The data types of the operands for the operation "=" are 
not 
compatible or comparable.  SQLSTATE=42818

basically, the query that gets generated is select .. from django_comments 
where object_pk = 
'11'   and since object_pk is a TextField which gets generated as a Clob.  
would want the query to be varchar(object_pk) = '11' which would work

What version of the product are you using? On what operating system?
1.0, linux 2.6.31.5-127.fc12.i686  using db2 9.7 fixpack 1

Please provide any additional information below.

Original issue reported on code.google.com by njaf...@gmail.com on 9 Dec 2009 at 8:31

GoogleCodeExporter commented 9 years ago
There is a discussion going on in Django forum for similar type of defect 
mentioned 
here. 

Follow the link to this discussion: http://groups.google.co.in/group/django-
developers/browse_thread/thread/f91749b81465ce04

Regards,
Ambrish Bhargava

Original comment by abhar...@in.ibm.com on 10 Dec 2009 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 18 Jan 2010 at 5:50

GoogleCodeExporter commented 9 years ago
Fixed in ibm_db_django-0.2.0

Original comment by rahul.pr...@in.ibm.com on 27 Mar 2010 at 8:44