﻿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
10892	ManyToManyField attribute looks up wrong name in Admin	jhawk28@…	nobody	"ManyToManyField attribute does not look up the correct key in the Admin if the django naming conventions are not followed in a legacy database.

This returns an error like:
ORA-00904: ""AUTH_BOOK_MAPPING"".""BOOK_ID"": invalid identifier
Example:

{{{
class Book(models.Model):
  book = models.CharField(max_length=4, primary_key=True, db_column='BOOK')
  description = models.CharField(max_length=250, db_column='DESCRIPTION', blank=True)
  class Meta:
    db_table = u'BOOK_TABLE'

class Author(models.Model):
  auth = models.DecimalField(decimal_places=0, max_digits=38, primary_key=True, db_column='AUTH_ID')
  name = models.CharField(max_length=250, db_column='NAME', blank=True)
  books = models.ManyToManyField(Book, db_table=u'AUTH_BOOK_MAPPING')
  class Meta:
    db_table = u'AUTHOR_TABLE'

}}}
"		closed	contrib.admin	dev		wontfix	ManyToManyField		Unreviewed	0	0	0	0	0	0
