Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): allow disabling duplicate entities discovery validation #4618

Merged

Conversation

thiagomini
Copy link
Contributor

@thiagomini thiagomini commented Aug 11, 2023

This PR adds a new option to the discovery object called checkDuplicateEntities. This new option aims to allow the client code to control the behavior regarding duplicated entities discovered. There might be situations where we just want to ignore the duplicates.

Closes mikro-orm/nestjs#132

@thiagomini thiagomini changed the title Feature/check duplicate entities config feat(core): check duplicate entities config Aug 11, 2023
Copy link
Contributor

@rubiin rubiin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@B4nan B4nan changed the title feat(core): check duplicate entities config feat(core): allow disabling duplicate entities discovery validation Aug 14, 2023
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (79af75c) 99.64% compared to head (aeacd40) 99.64%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4618   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files         215      215           
  Lines       14247    14261   +14     
  Branches     3389     3394    +5     
=======================================
+ Hits        14196    14210   +14     
  Misses         50       50           
  Partials        1        1           
Files Changed Coverage Δ
packages/core/src/utils/Configuration.ts 100.00% <ø> (ø)
packages/core/src/metadata/MetadataDiscovery.ts 98.99% <100.00%> (ø)
packages/core/src/metadata/MetadataValidator.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@B4nan B4nan merged commit 3ff0dda into mikro-orm:master Aug 14, 2023
12 checks passed
@thiagomini thiagomini deleted the feature/check-duplicate-entities-config branch August 14, 2023 12:15
@thiagomini
Copy link
Contributor Author

Thanks for accepting and merging the PR, Martin! That will definitely help me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MetadataError: Duplicate entity names are not allowed: "User"
3 participants