Yes.... and I thought that adding my code with allowing the _id to be
defined, with type ObjectID, would need it to be enforced to this type
only, but all the tests actually pass with other types as well ! I will
remove that part of the commit, and update the readme, thanks.

Raymond suggested to remove the _id availability altogether, which would
simplify the PR a lot, but do you know any user who rely on accessing _id
property ? Would this be an issue if it is removed ?


2014-02-24 2:27 GMT+01:00 Ritchie Martori <notifications@github.com>:

> In test/mongodb.test.js:
>
> > @@ -32,15 +38,141 @@ describe('mongodb', function () {
> >    beforeEach(function (done) {
> >      User.destroyAll(function () {
> >        Post.destroyAll(function () {
> > +        PostWithObjectId.destroyAll(function () {
> > +          done();
> > +        });
> > +      });
> > +    });
> > +  });
> > +
> > +
> > +  it('choosing _id as a model ID should throw an error if type is not MongoDBObjectID', function (done) {
> > +    (function() {
> > +      db.define('GoodModel', {_id: {type: db.ObjectID, id: true}})
> > +    }).should.not.throw();
> > +
> > +    (function() {
> > +      db.define('BadModel', {_id: {type: String, id: true}})
>
> Users are using this feature to support existing mongodb data. Does this
> fix require removing support for this?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/strongloop/loopback-connector-mongodb/pull/19/files#r9979359>
> .
>