These are chat archives for vdemedes/mongorito

29th
Nov 2016
Callum Lyall
@BeachedCactus
Nov 29 2016 12:15
Hi there! When I assign a ID before saving using ObjectId from mongorito.ObjectId it doesn't actually save but still passes. Any ideas? Thanks
Callum Lyall
@BeachedCactus
Nov 29 2016 12:32
Here is the object I save
{
  _id: 583d7536b293ffc34acca87b,
  report: 583d7533b293ffc34acca87a,
  name: 'Test 1',
  type: 'hard',
  status: 'ok',
  tolerance: '0.000',
  mergeComposites: undefined,
  clashResults: [...]
}
const ObjectId = require('mongorito').ObjectID;
...
let clashtest = {
  _id: ObjectId(),
  report: this.report._id,
   ...
}
    let ct = new ClashTest();
    ct.set(clashtest);
    yield ct.save();