#11580: Unable to query TextField against oracle nclob 10Gr4
---------------------------------------------------+------------------------
          Reporter:  nosrednakram                  |         Owner:  nobody     
     
            Status:  new                           |     Milestone:             
     
         Component:  Database layer (models, ORM)  |       Version:  1.1-beta-1 
     
        Resolution:                                |      Keywords:  oracle 
TextField
             Stage:  Accepted                      |     Has_patch:  0          
     
        Needs_docs:  0                             |   Needs_tests:  0          
     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by nosrednakram):

 Hello,

 Thanks for your quick reply, I did a rough hack based on your information,
 I'll try and get to cleaning up at a later date so I can search the entire
 lob contents and maybe even post a patch.  This will get me by until I can
 come back to this in a week or so unless someone else creates a patch
 first.  This also allowed the searching of lobs within the ADMIN interface
 again.

 I modified django/db/backends/oracle/base.py and gave a size to the
 substr, it didn't have one, FYI.

 WAS:
 {{{
 #!py
     def field_cast_sql(self, db_type):
         if db_type and db_type.endswith('LOB'):
             return "DBMS_LOB.SUBSTR(%s)"
         else:
             return "%s"
 }}}
 NOW:
 {{{
 #!py
     def field_cast_sql(self, db_type):
         if db_type and db_type.endswith('LOB'):
             return "DBMS_LOB.SUBSTR(%s,2000,1)"
         else:
             return "%s"
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11580#comment:3>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to