Typegoose - Define Mongoose models using TypeScript classes.
MIT License
Bot releases are hidden (Show)
Published by hasezoey almost 5 years ago
isString
and isNumber
to check against their mongoose.Schema.Types.*.name
equivalent (fixes #149 )Published by hasezoey almost 5 years ago
This Update may break some code (mongoose upgrade, inline _id
change, enum
changes)
useNewEnum
(and TG_USE_NEW_ENUM
) got removed, because it would interfer with the number-enumsPropOptions
type for autopopulate
Schema
, it is now handled by mapOptions
& mapArrayOptions
tslint-consistent-codestyle
Published by hasezoey almost 5 years ago
mapArrayOptions
now uses mapOptions
mapOptions
Published by hasezoey almost 5 years ago
warnMixed
now uses the right target
utils.getRightTarget
Published by hasezoey almost 5 years ago
_id: false/true
bettergetClass
getName
Published by hasezoey almost 5 years ago
Published by hasezoey almost 5 years ago
Published by hasezoey almost 5 years ago
@prop
Published by hasezoey almost 5 years ago
_id: false
(and apply it) for @mapProp
_id
if subDocumentPublished by hasezoey almost 5 years ago
deleteModel
now deletes the model from the connection it is on typegoose/typegoose#119Published by hasezoey almost 5 years ago
@staticMethod
& @instanceMethod
, because they were completly obsolete@prop({ validate })
now accepts { validator, message }
as an arraydeleteModel
& deleteModelWithClass
setGlobalOptions
runSyncIndexes
allowMixed
text
to PropOptionsitemsRef
, itemsRefPath
& itemsRefType
DocumentType
will now overwrite the type of _id
if the class is extending Base
(in typescript there is currently no other way)tslib
as dependencie to minimize generated codesetModelForClass
setGlobalOptions({ globalOptions: { useNewEnum: true } })
(to not break existing databases made with the old handling)getModelWithString
initAsObject
and initAsArray
into initProperty
isNullOrUndefined
checksMixed
is doneIModelOptions
are merged (thanks to lodash cloneDeepWith
& mergeWith
)Buffer
& Decimal
now workprop.ts
Published by hasezoey about 5 years ago
This Release didnt change anything on the code, it was mostly tests & github-page
Published by hasezoey about 5 years ago
@plugin
, options are now checked if they are an object, when not: make them an object_buildSchema
autopopulate
, only has an effect if mongoose-autopopulate
is usedFindOrCreate
which has the types for mongoose-findorcreate
Published by hasezoey about 5 years ago
Published by hasezoey about 5 years ago
refType
on PropOptionsrefPath
now uses the right type (new uses refType
instead of itemsType
)next
is now not marked as "optional" anymore, which caused next()
to be EmptyVoidFn | undefined
Published by hasezoey about 5 years ago
For the changelog please look at https://typegoose.github.io/typegoose/changelog#600
Published by hasezoey about 5 years ago
Change README examples & badges to the new repo
use new travis.yml (from version 6.0.0)
use new style of package.json (from version 6.0.0)
Tags got deleted and added, please remove all local tags and re-download them
This Release did not change anything in the code, it is just there to update the NPM front
Published by hasezoey about 5 years ago
Published by hasezoey about 5 years ago
itemsRefPath
& adding testsitemsRef
now supports to be used with a string as model@prop({ alias })
is now supportedisDocument
& isDocumentArray
typeguards are now implemented@mapProp()
is now implemented@prop({ select })
buildSchema
is now available