Returns true if the document field values are equal; otherwise, returns false. This method is only called if both values are not null and the values are not strictly equal.
First document field value.
Other document field value.
Returns true if the document field values are equal; otherwise, returns false. This method is only called if both values are not null and the values are not strictly equal.
First document field value.
Other document field value.
Converts an object property value to a document field value.
The property value to convert.
Converts an object property value to a document field value.
The property value to convert.
Converts a document field value to an object property value.
The field value to convert.
Converts a document field value to an object property value.
The field value to convert.
Generated using TypeDoc
Describes a type that is able to convert an entity or embeddable property value to a MongoDB document field and back.
Example
The example below defines a PropertyConverter that converts an instance of a Point class to a string.
class PointConverter implements PropertyConverter { convertToDocumentField(property: any): any { if(property instanceof Point) { return [property.x, property.y].join(","); } } convertToObjectProperty(field: any): any { if(typeof field === "string") { var parts = field.split(","); return new Point(parts[0], parts[1]); } } }