-
Type: Bug
-
Resolution: Won't Do
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:
-
Environment:Java, MacOS, chrome
*Location*: https://docs.mongodb.com/manual/tutorial/update-documents/#Updating-%7B%7Bupserts%7D%7D
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
*Screen Resolution*: 1440 x 900
If Morphia code was included, it could be more helpful
I could not get insert method(failing if id exists, rather than save method) in Morphia's Datastore, later going through code I found out that Morphia creates AdvancedDatastore(which extends Datastore and contains insert method) and returns it as Datastore. So I needed to typecast datastore and use methods from advanced interface!