1 | ;
|
2 |
|
3 | const BaseDocument = require('./base-document');
|
4 |
|
5 | class EmbeddedDocument extends BaseDocument {
|
6 | constructor() {
|
7 | super();
|
8 |
|
9 | // TODO: Move _id logic out of BaseDocument.
|
10 | // A better fix to this issue is to remove
|
11 | // _schema._id and _id from BaseDocument. But
|
12 | // since quite a bit of _id logic is still
|
13 | // in BD, we'll have to use this fix until
|
14 | // it is removed
|
15 | delete this._schema._id;
|
16 | delete this._id;
|
17 | }
|
18 |
|
19 | // TODO: Is there a way to tell if a class is
|
20 | // a subclass of something? Until I find out
|
21 | // how, we'll be lazy use this.
|
22 | static documentClass() {
|
23 | return 'embedded';
|
24 | }
|
25 |
|
26 | documentClass() {
|
27 | return 'embedded';
|
28 | }
|
29 | }
|
30 |
|
31 | module.exports = EmbeddedDocument; |
\ | No newline at end of file |