Hello !
This is an edited version, since yesterday's version is my tired-state-of-mind version which is kinda hard to read
1.0.0.M5 here
Is it possible that i use the update() builder method without actually setting anything ? In the current version, it seems that the update method must at least receive 2 params, which is the key and the value to be set.
There are some cases where i want to just increment a field, without actually setting anything.
The code that im currently doing to have my increment, where i have to 'fake' the set value update using update("text", "XXXXXXXXXXXX")
I wonder whether this below is possible, but what i have in mind is that i dont have to set anything to do my increment, such as this code snipped (that obviously doesnt compile, since there's no update() method that is parameterless):Code:this.ops.updateFirst( query(where("_id").is(id)), update("text", "XXXXXXXXXXXX").inc("test", 10), collectionName);
Thanks !Code:this.ops.updateFirst( query(where("_id").is(id)), update().inc("test", 10), collectionName);



Reply With Quote
