LearnBoost/mongoose — Issue #600: accessing properties created in on the fly schemas without .get()
Author: secoif
Created: 2011-11-08 10:38:46+00:00
State: open

Turns out you can't access access properties defined with set() without using get()

```javascript
setting on the fly schemas should cache the type schema and cast values appropriately': function () {
var db = start()
, Decorated = db.model('Decorated', collection);

var post = new Decorated();
post.set('adhoc', '9', Number);
post.get('adhoc').valueOf().should.eql(9); // <<<< Why not post.adhoc?
db.close();
},
```

Is there a way around this, as it's rather confusing since the property appears to be there from the perspective of a console.log(), but will return `undefined` unless accessed via `get`?