Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hydrate-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydrate-mongodb - npm Package Compare versions

Comparing version 1.3.3 to 1.4.0

4

mapping/mappingModel.d.ts

@@ -128,5 +128,5 @@ import { Index } from "./index";

/**
* Indicates the property is read-only.
* Indicates the database field should not be read during deserialization.
*/
ReadOnly = 512,
WriteOnly = 512,
/**

@@ -133,0 +133,0 @@ * Indicates the field should be eagerly fetched.

@@ -95,3 +95,4 @@ "use strict";

// skip fields that are not persisted
if ((property.flags & (1 /* Ignored */ | 64 /* InverseSide */)) != 0) {
if ((property.flags & (1 /* Ignored */ | 64 /* InverseSide */
| 512 /* WriteOnly */)) != 0) {
continue;

@@ -157,4 +158,3 @@ }

// skip fields that are not persisted
if ((flags & (1 /* Ignored */ | 64 /* InverseSide */
| 512 /* ReadOnly */)) != 0) {
if ((flags & (1 /* Ignored */ | 64 /* InverseSide */)) != 0) {
continue;

@@ -161,0 +161,0 @@ }

@@ -264,2 +264,3 @@ import { PropertyConverter, FlushPriority, FetchType } from "../mappingModel";

nullable: boolean;
readable: boolean;
constructor(name?: string);

@@ -271,4 +272,16 @@ constructor(args: FieldDescription);

export interface FieldDescription {
/**
* The name of the database document field.
*/
name?: string;
/**
* Indicates if null values are supported. If false then null values are not written to the database. Default is false.
*/
nullable?: boolean;
/**
* Indicates if the database document field should be read. Default is true. If set the `false` the database document field may still
* be written to but the field value is not read when deserializing the document from the database. This is useful if your entity has
* an accessor with a value calculated from other fields in the class that you want to store to the database for queries.
*/
readable?: boolean;
}

@@ -275,0 +288,0 @@ /**

@@ -498,2 +498,3 @@ "use strict";

_this.nullable = args.nullable;
_this.readable = args.readable;
}

@@ -513,2 +514,5 @@ }

}
if (annotation.readable === false) {
property.setFlags(512 /* WriteOnly */);
}
};

@@ -515,0 +519,0 @@ return FieldAnnotation;

{
"name": "hydrate-mongodb",
"description": "An Object Document Mapper (ODM) for MongoDB.",
"version": "1.3.3",
"version": "1.4.0",
"author": {

@@ -27,3 +27,3 @@ "name": "Artifact Health, LLC",

"mongodb": "^2.1.19",
"reflect-helper": "^1.0.2",
"reflect-helper": "^1.1.0",
"rx": "^4.1.0"

@@ -30,0 +30,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc