diff --git a/tests/regressiontests/multiple_database_regress/__init__.py b/tests/regressiontests/multiple_database_regress/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/multiple_database_regress/models.py b/tests/regressiontests/multiple_database_regress/models.py
new file mode 100644
index 0000000..5f370dc
--- /dev/null
+++ b/tests/regressiontests/multiple_database_regress/models.py
@@ -0,0 +1,18 @@
+from django.db import models
+
+class Author(models.Model):
+    name = models.CharField(max_length=100)
+
+    def __unicode__(self):
+        return self.name
+
+class Book(models.Model):
+    title = models.CharField(max_length=100)
+    authors = models.ManyToManyField(Author, through='Authorship')
+
+    def __unicode__(self):
+        return self.title
+
+class Authorship(models.Model):
+    author = models.ForeignKey(Author, db_column='Author_ID')
+    book = models.ForeignKey(Book, db_column='Book_ID')
diff --git a/tests/regressiontests/multiple_database_regress/tests.py b/tests/regressiontests/multiple_database_regress/tests.py
new file mode 100644
index 0000000..84c534d
--- /dev/null
+++ b/tests/regressiontests/multiple_database_regress/tests.py
@@ -0,0 +1,17 @@
+from django.test import TestCase
+
+from models import Author, Book, Authorship
+
+class ManyToManyWithCustomColumnTestCase(TestCase):
+    def setUp(self):
+        self.a = Author.objects.create(name="J.R.R. Tolkien")
+        self.b1 = Book.objects.create(title="The Hobbit")
+        self.b2 = Book.objects.create(title="The Fellowship of the Ring")
+        self.auth1 = Authorship.objects.create(author=self.a, book=self.b1)
+        self.auth2 = Authorship.objects.create(author=self.a, book=self.b2)
+
+    def test_query(self):
+        self.assertEqual(list(self.a.book_set.all()), [self.b1, self.b2])
+        self.assertEqual(list(self.b1.authors.all()), [self.a])
+        self.assertEqual(list(self.a.authorship_set.all()), [self.auth1, self.auth2])
+        self.assertEqual(list(self.b1.authorship_set.all()), [self.auth1])
