For MongoDB, ALL ForeignKeys now are saved not as ObjectIds but as strings. This completely breaks pretty much any lookup that has ForeignKey fields. Please either revert back (this any any related change) or fix and and properly test it before making it available.
This is a show-stopper and not only breaks applications but also messes up data in the database.
Cannot reproduce. Maybe you mixed up branches.
ForeignKeys should be ObjectIds, not unicode.
from bson.objectid import ObjectId
from query.models import Blog, Post
post = Post.objects.create(blog=Blog.objects.create())
collection = get_collection(Post)
assert collection.count() == 1
doc = collection.find_one()
Added test for django-nonrel/django-nonrel#8
I'm using the 1.4 branch and have the same problem, foreign keys are saved as strings, which is not very nice. How to fix this?
I don't have this exact issue, but related I am finding that ForeignKeys in ListFields of Embedded Objects are being saved as strings. Is this a known issue/has it been fixed at some point?