Interesting, thanks for the follow up Scott.
If its a lot of work, I think a comment in the update method javadoc
would be better, I'm sure you guys have more than enough to do :)
Best,
Mark
On Aug 25, 5:05 pm, Scott Hernandez <
scotthernan...@gmail.com> wrote:
> Eliot, in the case where the WriteConcern has already caused the GLE call to
> be made we could set the _id on the document, but it seems like a lot of
> work for a (very) special case.
>
> On Wed, Aug 25, 2010 at 1:59 PM, Eliot Horowitz <
eliothorow...@gmail.com>wrote:
>
>
>
> > This is not a change that will ever happen.
> > We cannot add an _id client side since we don't know what's going to
> > happen on the server.
>
> > You can get the _id from an update by doing getLastError
>
> > > db.getLastErrorCmd()
> > {
> > "err" : null,
> > "updatedExisting" : false,
> > "upserted" : ObjectId("4c7584283d83d07c78674f34"),
> > "n" : 1,
> > "ok" : 1
> > }
>
> > You can update the javadocs by forking and submitting a patch.
>
> > On Wed, Aug 25, 2010 at 4:56 PM, mwaschkowski <
mwaschkow...@gmail.com>
> >
mongodb-user...@googlegroups.com<mongodb-user%2Bunsubscribe@google
groups.com>
> > .
> > >> >> > --
> > >> >> > You received this message because you are subscribed to the Google
> > Groups "mongodb-user" group.
> > >> >> > To post to this group, send email to
mongod...@googlegroups.com
> > .
> > >> >> > To unsubscribe from this group, send email to
> >
mongodb-user...@googlegroups.com<mongodb-user%2Bunsubscribe@google
groups.com>
> > .
> > >> > --
> > >> > You received this message because you are subscribed to the Google
> > Groups "mongodb-user" group.
> > >> > To post to this group, send email to
mongod...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to
> >
mongodb-user...@googlegroups.com<mongodb-user%2Bunsubscribe@google
groups.com>
> > .
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "mongodb-user" group.
> > > To post to this group, send email to
mongod...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> >
mongodb-user...@googlegroups.com<mongodb-user%2Bunsubscribe@google
groups.com>
> > .
> >
mongodb-user...@googlegroups.com<mongodb-user%2Bunsubscribe@google
groups.com>
> > .