Ticket #6639: query_patch.diff
File query_patch.diff, 1.1 KB (added by , 17 years ago) |
---|
-
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models/query.py
1023 1022 if field.rel: # One-to-One/Many-to-one field 1024 1023 new_table = current_table + '__' + name 1025 1024 new_opts = field.rel.to._meta 1026 new_column = new_opts.pk.column 1025 if hasattr(field.rel, 'field_name'): 1026 to_fields = field.rel.to._meta.fields 1027 to_fields_names = map(lambda x: x.name, to_fields) 1028 new_column = to_fields[to_fields_names.index(field.rel.field_name)].db_column 1029 else: 1030 new_column = new_opts.pk.column 1027 1031 join_column = field.column 1028 1032 raise FieldFound 1029 1033 elif path: