mongoose icon indicating copy to clipboard operation
mongoose copied to clipboard

SchemaFactory trigger an error when a schema doesn't have the @Schema decorator

Open DanielSuhett opened this issue 1 year ago • 0 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Other... Please describe:

What is the current behavior?

https://github.com/nestjs/mongoose/issues/1697

Issue Number: 1697

What is the new behavior?

When you call SchemaFactory.createForClass without a @Schema throw a new error. Tests to check update with Schema.

Does this PR introduce a breaking change?

  • [ ] Yes
  • [X] No

Other information

DanielSuhett avatar Mar 11 '23 14:03 DanielSuhett