These are chat archives for Automattic/mongoose

7th
Jul 2016
Dominic Böttger
@DominicBoettger
Jul 07 2016 13:30
Hi, any idea why i get a VersionError after doing a hydrate and then a save. Hydrate does not create a objectId. So i created a objectId manually before.
Dominic Böttger
@DominicBoettger
Jul 07 2016 13:40
solved it. The _v attribute is needed to save it after hydate
Matias Garat Ortiz
@matiasgaratortiz
Jul 07 2016 19:19
I have a schema:var tpl = new Schema({
name: {
type: String,
get: function (n) {return '<<<' + n + '>>>'
}, platforms:[{
name: {
type: String,
get: function () {return '*'}
}]
})
And, it works fine for name (return <<<NAME>>>, but doesn't works for platforms.name... any idea?