flatiron/resourceful — Issue #47: Resource.update() behaves strangely when resourceful.cache = false
Author: richmarr
Created: 2012-01-30 16:30:46+00:00
State: open

When using the cache I find that Resource.update() works fine:

``` js
resourceful.cache = true;
Wolf.get(42, function (err, wolf) {
if (err) { throw new(Error)(err) }
wolf.update({ fur: 'curly' }, function (e, wolf) {
console.log(wolf.fur); // "curly"
});
});
```

When I disable cache I get what looks like the OK response from Couch instantiated as a Resource:

``` js
resourceful.cache = false;
Wolf.get(42, function (err, wolf) {
if (err) { throw new(Error)(err) }
wolf.update({ fur: 'curly' }, function (e, wolf) {
console.log(wolf.fur); // "undefined"
console.log(wolf); // " { _id: undefined, fur: undefined, resource: 'Wolf', ok: true, id: '18d001bda4786fb23738cd49e0000885', rev: '35-c314a9dad27908b45a33d04550a86af2' } }"
});
});
```

Happy to have a crack at fixing this, just not 100% sure where you guys would expect that fix to go as some of the possible approaches involve interface changes.