#11107: ManyToManyFields defined with keyword 'through' should not be 
manipulated
as auto-generated m2m tables.
---------------------------------------------------+------------------------
          Reporter:  j...@sdf.lonestar.org          |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  1     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by mir):

 I fail to verify the issue. I used the following models:

 {{{
 from django.db import models

 class Member(models.Model):
     name = models.CharField(max_length=30)

 class Venue(models.Model):
     # [... snip fields ...]
     member_set = models.ManyToManyField('Member',
                                         through='VenueMember',
                                         blank=True)

 class VenueMember(models.Model):
     id = models.AutoField(db_column='venue_member_id', primary_key=True)
     venue = models.ForeignKey(Venue)
     member = models.ForeignKey(Member)
 }}}

 when I do manage.py sql testapp, I get the following result for postgresql
 8.3, psycopg2:

 {{{
 BEGIN;
 CREATE TABLE "testapp_member" (
     "id" serial NOT NULL PRIMARY KEY,
     "name" varchar(30) NOT NULL
 )
 ;
 CREATE TABLE "testapp_venue" (
     "id" serial NOT NULL PRIMARY KEY
 )
 ;
 CREATE TABLE "testapp_venuemember" (
     "venue_member_id" serial NOT NULL PRIMARY KEY,
     "venue_id" integer NOT NULL REFERENCES "testapp_venue" ("id")
 DEFERRABLE INITIALLY DEFERRED,
     "member_id" integer NOT NULL REFERENCES "testapp_member" ("id")
 DEFERRABLE INITIALLY DEFERRED
 )
 ;
 COMMIT;
 }}}

 I'm using current trunk (rev. 10756) with python 2.4.

 So everything looks fine to me. Can you give me a step-by-step instruction
 on how to reproduce the bug?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11107#comment:2>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to