#10892: ManyToManyField attribute looks up wrong name in Admin
----------------------------------+-----------------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone: 1.1
Component: django.contrib.admin | Version: SVN
Keywords: ManyToManyField | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
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'
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/10892>
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
-~----------~----~----~----~------~----~------~--~---