aboutsummaryrefslogtreecommitdiff
path: root/src/fields/DocumentReference.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-02-13 16:38:09 -0500
committeryipstanley <stanley_yip@brown.edu>2019-02-13 16:38:09 -0500
commit430878f6dd8d36b1322e15d0898ada0d44fecacb (patch)
tree027fb9b578a3fee8d97b16922a930806da00afaa /src/fields/DocumentReference.ts
parent2eb147ab8f25e6dd90f47cf21499c7340642f0c9 (diff)
Asdfjkla/sdfklj
Diffstat (limited to 'src/fields/DocumentReference.ts')
-rw-r--r--src/fields/DocumentReference.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fields/DocumentReference.ts b/src/fields/DocumentReference.ts
index ab4c4644e..b3d8e059d 100644
--- a/src/fields/DocumentReference.ts
+++ b/src/fields/DocumentReference.ts
@@ -2,6 +2,7 @@ import { Field, Opt, FieldValue, FIELD_ID } from "./Field";
import { Document } from "./Document";
import { Key } from "./Key";
import { Types } from "../server/Message";
+import { ObjectID } from "bson";
export class DocumentReference extends Field {
get Key(): Key {
@@ -42,11 +43,11 @@ export class DocumentReference extends Field {
return "";
}
- ToJson(): { type: Types, data: FIELD_ID, id: string } {
+ ToJson(): { type: Types, data: FIELD_ID, _id: ObjectID } {
return {
type: Types.DocumentReference,
data: this.document.Id,
- id: this.Id as string
+ _id: new ObjectID(this.Id)
}
}
} \ No newline at end of file