-
Type:
Bug
-
Resolution: Done
-
Priority:
Blocker - P1
-
None
-
Affects Version/s: 1.10
-
Component/s: None
-
None
-
Environment:Windows
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Here is psedu code :
Cat Gor = new Cat(){ IsAlive = true}; MongoGorCollection.Save(Gor); //Saving Gor as a main level document Cage CatCage = new Cage(){ Animals.AddRange( new Cat[] { Gor } )}; MongoCageCollection.Save(CatCage); //Adding Gor to Animals list of Cage as a sub-document var RetrieveGor = MongoGorCollection.FirstOrDefault(); RetrieveGor.IsAlive = false; MongoGorCollection.Save(RetrieveGor); //Well, we have changed IsAlive of Gor to false and saved back in DB. // So if I retrieve the only cat in the Cage then it must be dead. bool IsAliveShouldBeFalse = MongoCageCollection.FirstOrDefault().Animals.FirstOrDefault().IsAlive; //IsAliveShouldBeFalse is not false! It's true.
I have checked DB with MongoVUE and I see two document with same ID has different values!
Here is the link to screenshot :
http://i57.tinypic.com/2qtekn7.png