Use this class if raw mongoose for a path is wanted It is still recommended to use the typegoose classes directly
Using Passthrough, the paths created will also result as an Schema (since mongoose 6.0), see Mongoose#7181
Passthrough
Schema
class Dummy { @prop({ type: () => new Passthrough({ somePath: String }) }) public somepath: { somePath: string };}class Dummy { @prop({ type: () => new Passthrough({ somePath: String }, true) }) public somepath: { somePath: string };} Copy
class Dummy { @prop({ type: () => new Passthrough({ somePath: String }) }) public somepath: { somePath: string };}class Dummy { @prop({ type: () => new Passthrough({ somePath: String }, true) }) public somepath: { somePath: string };}
Use this like new mongoose.Schema()
new mongoose.Schema()
The Schema definition
Optional
Directly insert "raw", instead of using "type" (this will not apply any other inner options)
Generated using TypeDoc
Use this class if raw mongoose for a path is wanted It is still recommended to use the typegoose classes directly
See
Using
Passthrough
, the paths created will also result as anSchema
(since mongoose 6.0), see Mongoose#7181Example