On Wed, 2009-05-13 at 17:20 -0400, J. Cliff Dyer wrote:
> On Wed, 2009-05-13 at 15:31 -0400, J. Cliff Dyer wrote:
> > On Wed, 2009-05-13 at 14:40 -0400, J. Cliff Dyer wrote:
> 
> > > [...] but it occurs to me that if through=MyModel is set on the
> > > ManyToMany, the sequence on MyModel will already be handled by the loop
> > > at line 112.  I think I can code up a patch that will fix #10881 and my
> > > problem above in one fell swoop, with the caveat that in order for a
> > > ManyToManyField to function properly with a non-integer primary key, it
> > > will have to be defined as a model, and passed in explicitly with the
> > > through=MyModel syntax.
> > > 
> > > Patch forthcoming.
> > > 
> > 
> > I've attached a patch to #10881 that fixes the reported problem and also
> > fixes mine for ./manage.py dbsync operations, but not for ./manage.py
> > flush; I still get the same error.
> > 
> > Cheers,
> > Cliff
> 
> Since the patch seemed to be creeping beyond the scope of the reported
> bug, I created a new ticket: #11107, and attached a patch to it which
> solves the problem in all its manifestations, at least for postgres.  I
> can't try it on other databases.  I'm new to django development and I
> haven't gotten the test suite to run, so I haven't attached any tests.
> If somebody has a chance to implement tests, that would be amazing, but
> in the meantime, I'll try to figure out the test framework, and get it
> running.
> 
> In the meantime, could somebody take a look at the patch, and let me
> know if it needs any improvements?
> 
> Cheers,
> Cliff

The patch on #11107 (many_to_many.rel.through.4.diff) is all in order
with appropriate tests included.

The bug was also reported for oracle, so I added the same fix to the
oracle backend, but I don't have access to an oracle db, so I can't try
it out.  

The tests are in regressiontests/m2m_through_regress, and they pass for
postgresql and postgresql_psycopg2 (and fail appropriately without the
the rest of the patch).  Can someone test it on oracle?  Assuming that
works, I think it's ready to go.

Cheers,
Cliff



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to