KristianOellegaard/django-hvad — pull request #16 by bradenmacdonald (2012-01-30 19:53:15+00:00)
Title: Test case showing problem with ManyToMany relations

I have been experiencing strange bugs where fetching translated objects across a many-to-many relation returns duplicate objects, or unrelated objects that should not be returned by the queryset. Here is a simple test case showing one example of a ManyToMany relation that gets ignored when fetching translated objects.

The new test case fetches across a ManyToMany relation in two ways. The first way works fine, but the second way pulls in an unrelated object.

I think there is a problem with JOIN clauses in the SQL generated by django-hvad, but I'm not sure what's actually causing this.