Django

Code

Show
Ignore:
Timestamp:
07/08/08 13:46:09 (3 months ago)
Author:
jbronn
Message:

gis: Fixed bug in GeoQuery.get_default_columns; forgot to make Oracle spatial lookup terms structure a dictionary.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis/django/contrib/gis/db/backend/oracle/query.py

    r7836 r7870  
    105105MISC_TERMS = ['isnull'] 
    106106 
    107 # Assacceptable lookup types for Oracle spatial. 
     107# Acceptable lookup types for Oracle spatial. 
    108108ORACLE_SPATIAL_TERMS  = ORACLE_GEOMETRY_FUNCTIONS.keys() 
    109109ORACLE_SPATIAL_TERMS += MISC_TERMS 
    110 ORACLE_SPATIAL_TERMS = tuple(ORACLE_SPATIAL_TERMS) # Making immutable 
     110ORACLE_SPATIAL_TERMS = dict((term, None) for term in ORACLE_SPATIAL_TERMS) # Making dictionary for fast lookups 
    111111 
    112112#### The `get_geo_where_clause` function for Oracle #### 
  • django/branches/gis/django/contrib/gis/db/models/sql/query.py

    r7836 r7870  
    1111# Valid GIS query types. 
    1212ALL_TERMS = sql.constants.QUERY_TERMS.copy() 
    13 ALL_TERMS.update(dict([(term, None) for term in SpatialBackend.gis_terms])
     13ALL_TERMS.update(SpatialBackend.gis_terms
    1414 
    1515class GeoQuery(sql.Query): 
     
    126126        seen = {None: table_alias} 
    127127        aliases = set() 
    128         for field, model in self.model._meta.get_fields_with_model(): 
     128        for field, model in opts.get_fields_with_model(): 
    129129            try: 
    130130                alias = seen[model]