Original Reporter: emedina
Environment: Not Specified
Version: 1.0.0.M7
Migrated From: http://jira.grails.org/browse/GPMONGODB-93
According to the documentation, you can force the WriteConcern based on specific domain classes. For instance:
class A {
static mapWith = 'mongo'
ObjectId id
String name
static mapping = {
writeConcern WriteConcern.FSYNC_SAFE
}
}
However, this has no effect when saving/updating the domain class instances, as if it's completely ignored.
For example, if I try to save an instance of class A, MongoDB displays the following output in console:
Mon Aug 22 10:38:28 [conn281] insert test.a 0ms
As you can see, there's not reference to getLastError() whatsoever, and I would expect something like this:
query test.$cmd ntoreturn:1 command: { getlasterror: 1, w: 1, wtimeout: 0 } reslen:94 0ms