Commits

Al...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 3edd2cd

[soc2010/query-refactor] Fixed querying for objects by their related objects (by their primary keys).

  • Participants
  • Parent commits a98ac22
  • Branches soc2010/query-refactor

Comments (0)

Files changed (2)

File django/contrib/mongodb/base.py

 class DatabaseFeatures(object):
     interprets_empty_strings_as_nulls = False
     sql_nulls = False
+    related_fields_match_type = False
 
 
 class DatabaseOperations(object):

File tests/regressiontests/mongodb/tests.py

         self.assertEqual(b.current_group_id, e.pk)
         self.assertFalse(hasattr(b, "_current_group_cache"))
         self.assertEqual(b.current_group, e)
+        
+        self.assertEqual(Artist.objects.get(current_group=e), b)
+        self.assertEqual(Artist.objects.get(current_group__id=e.pk), b)
     
     def test_exists(self):
         self.assertFalse(Artist.objects.filter(name="Brian May").exists())