refactor!: remove deprecated findByIds from Repository and EntityManager#12114
refactor!: remove deprecated findByIds from Repository and EntityManager#12114pkuczynski merged 12 commits intomasterfrom
Conversation
Deploying typeorm with
|
| Latest commit: |
69ff7a8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://937a0d2d.typeorm.pages.dev |
| Branch Preview URL: | https://refactor-remove-find-by-ids.typeorm.pages.dev |
Review Summary by QodoRemove deprecated findByIds method from all public APIs
WalkthroughsDescription• Remove deprecated findByIds method from public APIs - Removed from EntityManager, Repository, BaseEntity - Removed from MongoEntityManager, MongoRepository • Refactor internal callers to use alternative approaches - PlainObjectToDatabaseEntityTransformer uses createQueryBuilder().whereInIds() - SubjectDatabaseEntityLoader uses createEntityCursor with _id.$in • Remove tests that directly called findByIds • Update test titles and migration guide documentation Diagramflowchart LR
A["findByIds deprecated methods"] -->|removed from| B["EntityManager<br/>Repository<br/>BaseEntity"]
A -->|removed from| C["MongoEntityManager<br/>MongoRepository"]
D["Internal callers"] -->|refactored to| E["createQueryBuilder<br/>whereInIds"]
D -->|refactored to| F["createEntityCursor<br/>_id.$in"]
G["Tests & Docs"] -->|updated to| H["findBy with In operator"]
File Changes1. src/entity-manager/EntityManager.ts
|
commit: |
62be6fe to
12b3421
Compare
Code Review by Qodo
1.
|
Code Review by Qodo
1. as unknown as type bypass
|
Code Review by Qodo
1. as unknown as type bypass
|
alumni
left a comment
There was a problem hiding this comment.
See comment. SubjectDatabaseEntityLoader and PlainObjectToDatabaseEntityTransformer should not implement driver-specific logic.
Code Review by Qodo
1. findByIds still public
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Code Review by Qodo
1. Mongo docs suggest In()
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
|
Persistent review updated to latest commit c78dff7 |
1 similar comment
|
Persistent review updated to latest commit c78dff7 |
…d-by-ids # Conflicts: # docs/docs/guides/8-migration-v1.md
…d-by-ids # Conflicts: # docs/docs/guides/8-migration-v1.md
|
|
Persistent review updated to latest commit 69ff7a8 |



Removes the deprecated
findByIdsmethod from all public APIs:EntityManager.findByIds()Repository.findByIds()BaseEntity.findByIds()MongoEntityManager.findByIds()MongoRepository.findByIds()The method was deprecated in favor of
findBywith theInoperator:Internal callers have been refactored:
PlainObjectToDatabaseEntityTransformernow usescreateQueryBuilder().whereInIds().getMany()SubjectDatabaseEntityLoaderMongoDB path now usescreateEntityCursorwith_id.$indirectlyTests that directly called
findByIdshave been removed. Remaining test titles that referencedfindByIdshave been updated to reflect the actual methods being tested. The migration guide has been updated.Closes #12077
Part of #11603.