Index: modeltests/m2m_sqlite_windows/__init__.py
===================================================================
Index: modeltests/m2m_sqlite_windows/fixtures/testdata.xml
===================================================================
--- modeltests/m2m_sqlite_windows/fixtures/testdata.xml	(revision 0)
+++ modeltests/m2m_sqlite_windows/fixtures/testdata.xml	(revision 0)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<django-objects version="1.0">
+	<object pk="1" model="auth.user">
+		<field type="CharField" name="username">twoface</field>
+		<field type="CharField" name="first_name">Harvey</field>
+		<field type="CharField" name="last_name">Dent</field>
+		<field type="CharField" name="email"></field>
+		<field type="CharField" name="password">sha1$9d97d$677bc2aed4ea5a6c529646d2f9fe531340a2625b</field>
+		<field type="BooleanField" name="is_staff">True</field>
+		<field type="BooleanField" name="is_active">True</field>
+		<field type="BooleanField" name="is_superuser">True</field>
+		<field type="DateTimeField" name="last_login">2007-07-17 15:46:41</field>
+		<field type="DateTimeField" name="date_joined">2007-07-17 15:46:41</field>
+		<field to="auth.group" name="groups" rel="ManyToManyRel"></field>
+		<field to="auth.permission" name="user_permissions" rel="ManyToManyRel"></field>
+	</object>
+	<object pk="2" model="auth.user">
+		<field type="CharField" name="username">penguin</field>
+		<field type="CharField" name="first_name">Oswald</field>
+		<field type="CharField" name="last_name">Cobblepot</field>
+		<field type="CharField" name="email"></field>
+		<field type="CharField" name="password">sha1$9d97d$677bc2aed4ea5a6c529646d2f9fe531340a2625b</field>
+		<field type="BooleanField" name="is_staff">True</field>
+		<field type="BooleanField" name="is_active">True</field>
+		<field type="BooleanField" name="is_superuser">True</field>
+		<field type="DateTimeField" name="last_login">2007-07-17 15:46:41</field>
+		<field type="DateTimeField" name="date_joined">2007-07-17 15:46:41</field>
+		<field to="auth.group" name="groups" rel="ManyToManyRel"></field>
+		<field to="auth.permission" name="user_permissions" rel="ManyToManyRel"></field>
+	</object>
+
+    <!-- twoface's books -->
+	<object pk="1" model="m2m_sqlite_windows.book">
+		<field type="CharField" name="name">My Lives: Two Face</field>
+		<field to="auth.user" name="users" rel="ManyToManyRel">
+			<object pk="1"></object>
+		</field>
+	</object>
+
+	<object pk="2" model="m2m_sqlite_windows.book">
+		<field type="CharField" name="name">Why we don't need Batman</field>
+		<field to="auth.user" name="users" rel="ManyToManyRel">
+			<object pk="1"></object>
+		</field>
+	</object>
+
+    <!-- penguin's books -->
+	<object pk="3" model="m2m_sqlite_windows.book">
+		<field type="CharField" name="name">Global Warming: The Looming Danger</field>
+		<field to="auth.user" name="users" rel="ManyToManyRel">
+			<object pk="2"></object>
+		</field>
+	</object>
+</django-objects>
\ No newline at end of file
Index: modeltests/m2m_sqlite_windows/models.py
===================================================================
--- modeltests/m2m_sqlite_windows/models.py	(revision 0)
+++ modeltests/m2m_sqlite_windows/models.py	(revision 0)
@@ -0,0 +1,35 @@
+"""
+Regression tests for Sqlite adapter, particularly on Windows
+
+"""
+from django.db import models
+from django.contrib.auth.models import User
+
+class Book(models.Model):
+    name = models.CharField(max_length = 255, unique = True)
+    users = models.ManyToManyField(User)
+
+    def __unicode__(self):
+        return self.name    
+
+__test__ = {'API_TESTS':"""
+#Look up all books
+>>> from django.core import management
+>>> management.call_command('loaddata', 'testdata.xml', verbosity=0)
+>>> Book.objects.filter()
+[<Book: My Lives: Two Face>, <Book: Why we don't need Batman>, <Book: Global Warming: The Looming Danger>]
+
+# Look up books belonging to twoface
+>>> Book.objects.filter(users__username = 'twoface')
+[<Book: My Lives: Two Face>, <Book: Why we don't need Batman>]
+
+>>> Book.objects.filter(users__username__exact = 'twoface')
+[<Book: My Lives: Two Face>, <Book: Why we don't need Batman>]
+
+# Look up books belonging to penguin
+>>> Book.objects.filter(users__username = 'penguin')
+[<Book: Global Warming: The Looming Danger>]
+
+>>> Book.objects.filter(users__username__exact = 'penguin')
+[<Book: Global Warming: The Looming Danger>]
+"""}
