You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v0.3.0, several APIs were changed but the existing APIs were kept but marked as deprecated.
Examples: Connection -> DataSource, findByIds.
In the v1.0 of TypeORM, we will remove these deprecated APIs.
This issue is currently a placeholder to track the overall task, but needs to have a list of the exact APIs to be removed, and should be referenced in any PRs removing these APIs.
ConnectionManager - was planning to later extract this to some package and use the single-flight pattern to acquire connections, but we can use git history to get it. Can be removed now.
...
MongoDB/BSON: Seems those deprecations are rather from the client, we just copy-pasted the types. Not sure if we need to do anything there.
Releasing v1.0 without any deprecated APIs sounds like a good idea. I'll start working on it this week and I'll document things as I go. I'll keep you posted
@jovanadjuric nice, there might be some things that don't have an alternative (or some deprecated functions that are used internally).
I'm thinking about ConnectionManager - we actually implemented our own in our project, but others might still rely on it. I don't think it should be a part of the ORM, but could be released as a separate package. Might be easier with the monorepo. Or we can let the community do that.
I think one that is used internally is findByIds - in SubjectDatabaseEntityLoader and PlainObjectToDatabaseEntityTransformer. First usage is probably easy to replace, second IDK. Not sure if there others.
We might need to decide how to separate the work for the next patch and the next major. Shall we create a main branch and make it the default?
@michaelbromley@naorpeled maybe we can have a meeting when everyone's back from holidays (late August / early September?) to plan the next major.
@jovanadjuric nice, there might be some things that don't have an alternative (or some deprecated functions that are used internally).
I'm thinking about ConnectionManager - we actually implemented our own in our project, but others might still rely on it. I don't think it should be a part of the ORM, but could be released as a separate package. Might be easier with the monorepo. Or we can let the community do that.
I think one that is used internally is findByIds - in SubjectDatabaseEntityLoader and PlainObjectToDatabaseEntityTransformer. First usage is probably easy to replace, second IDK. Not sure if there others.
We might need to decide how to separate the work for the next patch and the next major. Shall we create a main branch and make it the default?
@michaelbromley@naorpeled maybe we can have a meeting when everyone's back from holidays (late August / early September?) to plan the next major.
Yeah, let's do that, I'll send a poll at the beginning of September
Used in 20+ locations in RdbmsSchemaBuilder — major refactor to use getTables()/getViews() instead
Needs Maintainer Decision
Symbol
Issue
FindOptionsSelectByString
Removing breaks .find({ select: ["name", "email"] }) string-array syntax. SelectQueryBuilder has explicit Array.isArray() branches (lines 3256, 3276, 3773, 3778) and MongoEntityManager handles it too. Is this syntax actually meant to be removed in v1?
FindOptionsRelationByString
Removing breaks .find({ relations: ["author", "category"] }) string-array syntax. Same Array.isArray() branches in SelectQueryBuilder. Is this syntax actually meant to be removed in v1?
Items Flagged as Potentially Incorrectly Deprecated
Symbol
Reason
MysqlQueryRunner.isDefaultColumnWidth
Actively called during loadTables() schema introspection. No replacement method exists. AuroraMysqlQueryRunner has its own non-deprecated copy. Deprecation tag may be premature.
FindOptionsSelectByString
Powers a widely-used user-facing syntax; unclear if deprecation was intentional or aspirational
FindOptionsRelationByString
Same as above
OrderByCondition
Core internal type with 9 src/ dependents; no replacement type exists; @deprecated tag has no replacement text
1. Global Functions (src/globals.ts) — 13 items, all Safe
All 13 functions are deprecated with no replacement text. All publicly exported via export * from "./globals". None are imported by non-deprecated src/ code. createConnection() has 4 overloaded signatures (lines 63, 70, 77, 90).
Symbol
Kind
File
Replacement
Internal src/ usage
Test usage
Pure alias?
Still used internally?
Risk
getConnectionOptions()
function
:44
—
0
3 files (stub names)
No
No
Safe
getConnectionManager()
function
:55
—
0
0
No
No
Safe
createConnection()
function
:65–101
—
0
0
No
No
Safe
createConnections()
function
:112
—
0
0
No
No
Safe
getConnection()
function
:132
—
0
0
No
No
Safe
getManager()
function
:142
—
0
0
No
No
Safe
getMongoManager()
function
:152
—
0
0
No
No
Safe
getSqljsManager()
function
:166
—
0
0
No
No
Safe
getRepository()
function
:178
—
0
0
No
No
Safe
getTreeRepository()
function
:192
—
0
0
No
No
Safe
getCustomRepository()
function
:206
—
0
0
No
No
Safe
getMongoRepository()
function
:220
—
0
0
No
No
Safe
createQueryBuilder()
function
:234
—
0
0
No
No
Safe
2. Connection Module (src/connection/) — 5 items
Symbol
Kind
File
Replacement
Internal src/ usage
Test usage
Pure alias?
Still used internally?
Risk
Notes
Connection
class
Connection.ts:10
—
SpannerDriver.ts (type + constructor param)
4 files (type imports)
Yes (extends DataSource, no body)
Yes — SpannerDriver
Hard
Must migrate SpannerDriver first
ConnectionManager
class
ConnectionManager.ts:12
—
globals.ts (deprecated)
2 files (15 refs)
No (has Map-backed store logic)
No
Moderate
ConnectionOptions
type
ConnectionOptions.ts:10
DataSourceOptions
index.ts re-export only
15 files (59 refs)
Yes (= DataSourceOptions)
No
Moderate
Wide test surface
BaseConnectionOptions
type
BaseConnectionOptions.ts:8
—
SpannerConnectionOptions.ts extends it
0
Yes (= BaseDataSourceOptions)
Yes — non-deprecated driver code
Hard
Not publicly exported
ConnectionOptionsEnvReader
class
ConnectionOptionsEnvReader.ts:12
—
ConnectionOptionsReader.ts (non-deprecated) depends on it
Follow-up to the previous survey performed earlier. This documents what has been removed and what remains.
Note: This survey accounts for 4 in-flight PRs that are expected to merge imminently:
#12114 — Remove deprecated findByIds from Repository and EntityManager
#12149 — Replace deprecated substr with modern alternatives (no deprecated API impact)
#12159 — Batch DROP statements in CockroachDB (no deprecated API impact)
#12164 — Batch DROP statements in Postgres (no deprecated API impact)
Summary
Metric
Previous Survey
On master today
After in-flight PRs merge
@deprecated JSDoc tags (excl. MongoDB typings)
95 (41 files)
37 (15 files)
27 (12 files)
Comment-deprecated items (// deprecated)
2
0
0
Total deprecated items
94
35
25
69 of the original 94 deprecated items will have been removed once the in-flight PRs merge. 25 will remain.
Items REMOVED Since Previous Survey
Already merged (58 items)
Phase 1 — Safe removals (all 41 removed)
All 41 items previously tagged "Safe" have been successfully removed:
All 13 global functions (src/globals.ts): getConnectionOptions, getConnectionManager, createConnection, createConnections, getConnection, getManager, getMongoManager, getSqljsManager, getRepository, getTreeRepository, getCustomRepository, getMongoRepository, createQueryBuilder — the file now only contains getMetadataArgsStorage()
Container module (5 items): UseContainerOptions, ContainedType, ContainerInterface, defaultContainer, useContainer — Note: these still exist in container.ts but see "Still Present" section
QueryBuilder.replacePropertyNames() no-op stub — still present but no longer deprecated (the @deprecated JSDoc remains, and it is still actively called ~20 times)
InsertQueryBuilder.onConflict() — removed
Lock modes (2): pessimistic_partial_write, pessimistic_write_or_fail — both removed
Column options (3): ColumnNumericOptions.unsigned, ColumnOptions.readonly, EntitySchemaColumnOptions.readonly — all removed (unsigned still exists as a non-deprecated property)
Driver options (4): SAP pool.idleTimeout, MongoDB keepAlive/keepAliveInitialDelay, SqlServer domain — SAP pool.idleTimeout removed, SqlServer domain removed; MongoDB keepAlive/keepAliveInitialDelaystill present
Phase 3 — Hard removals (partial)
Sub-project A (Container + Connection subsystem): Connection class, BaseConnectionOptions, ConnectionOptionsEnvReader — Connection class and BaseConnectionOptions removed. ConnectionOptionsEnvReader never existed as a separate file (was part of ConnectionOptionsReader). However, getFromContainer() is still present and still used by ConnectionMetadataBuilder.
Sub-project C (Custom repository system): AbstractRepository, EntityRepository decorator — both removed
Sub-project E (nativeParameters): nativeParameters + setNativeParameters — both removed
Sub-project G (MySQL width/zerofill): All 7 zerofill/width properties across 4 interfaces + MysqlQueryRunner.isDefaultColumnWidth — all removed (zerofill/width no longer in decorator options; unsigned remains as a non-deprecated property)
PR #12114 removes all findByIds variants and refactors the two internal callers that were blocking removal:
PlainObjectToDatabaseEntityTransformer → now uses createQueryBuilder().whereInIds().getMany()
SubjectDatabaseEntityLoader MongoDB path → now uses createEntityCursor with _id.$in directly
Symbol
File
EntityManager.findByIds()
EntityManager.ts
MongoEntityManager.findByIds()
MongoEntityManager.ts
Repository.findByIds()
Repository.ts
MongoRepository.findByIds()
MongoRepository.ts
BaseEntity.findByIds()
BaseEntity.ts
EntityManager.findOneById()
EntityManager.ts
MongoEntityManager.findOneById()
MongoEntityManager.ts
Repository.findOneById()
Repository.ts
MongoRepository.findOneById()
MongoRepository.ts
BaseEntity.findOneById()
BaseEntity.ts
This resolves the findByIds persistence dependency chain, which was one of only 2 remaining hard blockers.
Items STILL PRESENT After All PRs Merge (25 deprecated items)
Container Module — 6 items (src/container.ts)
Symbol
Risk
Notes
UseContainerOptions
Safe
No internal usage
ContainedType<T>
Safe
Only used as param type of getFromContainer
ContainerInterface
Safe
No internal usage
defaultContainer
Safe
Only used by getFromContainer
useContainer()
Safe
No internal usage
getFromContainer()
Hard
Still called by ConnectionMetadataBuilder.ts (lines 45, 68) — this is the last hard blocker
Status: The entire container module is deprecated but getFromContainer still has a non-deprecated caller. ConnectionMetadataBuilder needs to be refactored to instantiate migrations/subscribers directly instead of going through the container.
Query Builder — 2 items
Symbol
File
Risk
Notes
replacePropertyNames()
QueryBuilder.ts:706
Moderate
Still deprecated but actively called ~20 times in SelectQueryBuilder, UpdateQueryBuilder, SoftDeleteQueryBuilder, and QueryBuilder itself. The previous survey noted it as a "no-op stub" but it appears to be a real method now.
OrderByCondition
OrderByCondition.ts:9
Hard
Still used in 9+ src/ files. No replacement type exists.
Note: These were listed as "Safe" in the previous survey but were not removed. They are all passthrough options to the MongoDB driver and removal is straightforward.
Remaining Blockers — Key Dependency Chains
Only 1 hard dependency chain remains (down from 4 in the original survey, 2 on current master):
The findByIds persistence chain, the EntityRepository/AbstractRepository/getCustomRepository chain, and the nativeParameters chain have all been fully resolved.
Recommended Next Steps
Immediate (Safe, no blockers)
Remove MongoDB options (11 items) — pure passthrough, zero internal logic. Single PR.
Short-term (minor refactoring)
Refactor ConnectionMetadataBuilder to not use getFromContainer(), then remove entire container.ts (6 items)
Replace OrderByCondition — define a new type and update 9+ src/ files
Refactor QueryRunner.loadedTables / loadedViews — migrate RdbmsSchemaBuilder to use getTables()/getViews()
Needs Maintainer Decision (unchanged)
FindOptionsSelectByString — Is .find({ select: ["name"] }) string-array syntax being removed in v1?
FindOptionsRelationByString — Is .find({ relations: ["author"] }) string-array syntax being removed in v1?
replacePropertyNames() — Tagged deprecated but actively used ~20 times. Is this actually being removed or should the tag be dropped?
Progress Summary
Category
Original
Removed (merged)
Removed (in-flight)
Remaining
Global Functions
13
13
—
0
Connection Module
5
4
—
0*
Container Module
6
0
—
6
DataSource Members
6
6
—
0
Entity Manager
5
1
4
0
Repository & BaseEntity
7
1
6
0
AbstractRepository
1
1
—
0
Decorators
2
1
—
1
Query Builder
6
3
—
2 (+1 uncertain)
Find Options
5
0
—
5
Lock Modes
2
2
—
0
Column/Schema Options
9
9
—
0
SAP Driver Options
7
7
—
0
MongoDB Driver Options
11
0
—
11
SqlServer Options
1
1
—
0
MySQL Driver
1
1
—
0
Misc Utilities
5
4
—
1
QueryRunner Cache
2
0
—
2
Total
94
54
10
25
* ConnectionOptionsEnvReader was folded into ConnectionOptionsReader, not a separate deprecated item
Removal velocity
Original survey: 94 deprecated items
Removed to date (merged): 58 (62%)
Removed by in-flight PRs: 10 (11%)
Total removed after PRs merge: 69 (73%)
Remaining: 25 (27%)
Of the 25 remaining, 11 are MongoDB passthrough options that could be removed in a single PR, which would bring the total down to 14 items (85% complete).
@GM-Alex at the moment we haven't merged that PR, we still have some debate about it, but the debate is rather about accepting string[] for select/relations. I would say join would be removed since it was long time deprecated and it would cause issues with type inference in the future.
Usually relations should cover it in most cases (the relation should be defined in the data model). There's also e.g. QueryBuilder.leftJoinAndMapMany, but I think you shouldn't have to use the QB methods in most cases.
There's also PR #12064 that should also change the left outer joins to inner joins in case of non-nullable relations to improve performance (but would need some thorough review before merging).
Do you have a use case that can't be handled via relations? I'd actually be curious how it looks like if you can share something :)
Activity
jovanadjuric commentedon Aug 18, 2025
Releasing v1.0 without any deprecated APIs sounds like a good idea. I'll start working on it this week and I'll document things as I go. I'll keep you posted
alumni commentedon Aug 18, 2025
@jovanadjuric nice, there might be some things that don't have an alternative (or some deprecated functions that are used internally).
I'm thinking about
ConnectionManager- we actually implemented our own in our project, but others might still rely on it. I don't think it should be a part of the ORM, but could be released as a separate package. Might be easier with the monorepo. Or we can let the community do that.I think one that is used internally is
findByIds- inSubjectDatabaseEntityLoaderandPlainObjectToDatabaseEntityTransformer. First usage is probably easy to replace, second IDK. Not sure if there others.We might need to decide how to separate the work for the next patch and the next major. Shall we create a
mainbranch and make it the default?@michaelbromley @naorpeled maybe we can have a meeting when everyone's back from holidays (late August / early September?) to plan the next major.
naorpeled commentedon Aug 18, 2025
Yeah, let's do that, I'll send a poll at the beginning of September
michaelbromley commentedon Feb 20, 2026
Deprecated API Survey — TypeORM v1.0
Full inventory of all deprecated APIs in
src/(excluding upstream MongoDB driver typings intypings.ts).Totals
@deprecatedJSDoc tags@deprecatedsymbolscreateConnectionoverloads)SelectQueryBuilder.ts)By Removal Risk
src/dependencies that must be migrated firstRecommended Removal Phases
Phase 1 — Safe removals (41 items)
Zero internal dependency, lowest user disruption. Can be done in a single PR or small batch.
src/globals.ts)UseContainerOptions,ContainedType,ContainerInterface,defaultContainer,useContainer(5 items)Repository.exist()(delegates toexists())WhereExpressioninterface (empty extends alias)InsertQueryBuilder.orUpdate()object-arg overloadpool.min,pool.maxWaitingRequests,pool.checkInterval(3 items)hanaClientDriver,pool.max,pool.requestTimeout(3 items)ssl,sslCA,sslCRL,sslCert,sslKey,sslPass,sslValidate(7 items)w,wtimeoutMS(2 items)Binary.SUBTYPE_UUID_OLDDriverUtils.buildColumnAliasEntityMetadata.createPropertyPathMigrationExecutor.getAllMigrationsBroadcaster.broadcastLoadEventsForAllPhase 2 — Moderate removals (28 items)
Require test suite migration and/or minor internal code changes.
name,isConnected,connect(),close(),getCustomRepository()+BaseDataSourceOptions.name(6 items)ConnectionManager,ConnectionOptionstype alias (2 items)findOneById,getCustomRepository,MongoEntityManager.findOneById(3 items)findOneById× 3 variants,BaseEntity.findByIds,BaseEntity.findOneById(4 items)replacePropertyNames(no-op stub, remove call sites),onConflict(2 items)FindOneOptions.join,JoinOptions(2 items)pessimistic_partial_write,pessimistic_write_or_fail(2 items)ColumnNumericOptions.unsigned,ColumnOptions.readonly,EntitySchemaColumnOptions.readonly(3 items)pool.idleTimeout, MongoDBkeepAlive/keepAliveInitialDelay, SqlServerdomain(4 items)Phase 3 — Hard removals (23 items)
Require significant internal migration before removal. Should be done as focused sub-projects.
Sub-project A: Container + Connection subsystem (4 items)
getFromContainer→ refactorConnectionMetadataBuilderoff IoC container patternConnectionclass → migrateSpannerDriverto useDataSourceBaseConnectionOptions→ migrateSpannerConnectionOptionsto extendBaseDataSourceOptionsConnectionOptionsEnvReader→ refactorConnectionOptionsReaderto inline env readingSub-project B:
findByIdspersistence migration (4 items)EntityManager.findByIds,MongoEntityManager.findByIds,Repository.findByIds,MongoRepository.findByIdsPlainObjectToDatabaseEntityTransformer.ts:135andSubjectDatabaseEntityLoader.ts:118must be migrated to usefindBy+InoperatorSub-project C: Custom repository system removal (3 items)
AbstractRepositoryclassEntityRepositorydecoratorentityRepositoriesmetadata storage,DataSource.getCustomRepository, andEntityManager.getCustomRepositorySub-project D: RelationCount pipeline (1 item)
RelationCountdecorator → deleteRelationCountAttribute,RelationCountLoader,RelationCountMetadata,RelationCountMetadataToAttributeTransformerSub-project E: nativeParameters refactor (2 items)
QueryExpressionMap.nativeParameters+QueryBuilder.setNativeParametersescapeQueryWithParametersin all 12 driver filesSub-project F: OrderByCondition replacement (1 item)
OrderByConditiontype used in 9src/files (QueryExpressionMap, entity metadata, entity schema, decorators)Sub-project G: MySQL width/zerofill removal (7 items)
MysqlQueryRunner.isDefaultColumnWidthSub-project H: QueryRunner cache properties (2 items)
QueryRunner.loadedTables,QueryRunner.loadedViewsRdbmsSchemaBuilder— major refactor to usegetTables()/getViews()insteadNeeds Maintainer Decision
FindOptionsSelectByString.find({ select: ["name", "email"] })string-array syntax.SelectQueryBuilderhas explicitArray.isArray()branches (lines 3256, 3276, 3773, 3778) andMongoEntityManagerhandles it too. Is this syntax actually meant to be removed in v1?FindOptionsRelationByString.find({ relations: ["author", "category"] })string-array syntax. SameArray.isArray()branches inSelectQueryBuilder. Is this syntax actually meant to be removed in v1?Items Flagged as Potentially Incorrectly Deprecated
MysqlQueryRunner.isDefaultColumnWidthloadTables()schema introspection. No replacement method exists.AuroraMysqlQueryRunnerhas its own non-deprecated copy. Deprecation tag may be premature.FindOptionsSelectByStringFindOptionsRelationByStringOrderByConditionsrc/dependents; no replacement type exists;@deprecatedtag has no replacement textKey Internal Dependency Chains
Per-Category Detail
1. Global Functions (
src/globals.ts) — 13 items, all SafeAll 13 functions are deprecated with no replacement text. All publicly exported via
export * from "./globals". None are imported by non-deprecatedsrc/code.createConnection()has 4 overloaded signatures (lines 63, 70, 77, 90).getConnectionOptions():44getConnectionManager():55createConnection():65–101createConnections():112getConnection():132getManager():142getMongoManager():152getSqljsManager():166getRepository():178getTreeRepository():192getCustomRepository():206getMongoRepository():220createQueryBuilder():2342. Connection Module (
src/connection/) — 5 itemsConnectionConnection.ts:10SpannerDriver.ts(type + constructor param)extends DataSource, no body)SpannerDriverConnectionManagerConnectionManager.ts:12globals.ts(deprecated)Map-backed store logic)ConnectionOptionsConnectionOptions.ts:10DataSourceOptionsindex.tsre-export only= DataSourceOptions)BaseConnectionOptionsBaseConnectionOptions.ts:8SpannerConnectionOptions.tsextends it= BaseDataSourceOptions)ConnectionOptionsEnvReaderConnectionOptionsEnvReader.ts:12ConnectionOptionsReader.ts(non-deprecated) depends on itConnectionOptionsReader3. Container Module (
src/container.ts) — 6 itemsUseContainerOptions:3ContainedType<T>:18getFromContainer)ContainerInterface:23defaultContainer:32getFromContainer()useContainer():59getFromContainer():72globals.ts,ConnectionMetadataBuilder.ts(3 calls)ConnectionMetadataBuilderis non-deprecatedDataSource→ConnectionMetadataBuilder→getFromContainer4. DataSource Deprecated Members — 6 items
DataSource.nameDataSource.ts:67ConnectionManager.ts(deprecated) + self error messages (6 sites)BaseDataSourceOptions.nameBaseDataSourceOptions.ts:25DataSource.ts:143,ConnectionOptionsReader.ts:59,78DataSource.nameDataSource.isConnectedDataSource.ts:170isInitializedisInitialized)DataSource.connect()DataSource.ts:295initialize()globals.ts(deprecated)initialize())DataSource.close()DataSource.ts:320destroy()destroy())DataSource.getCustomRepository()DataSource.ts:502Repository.extendglobals.ts(deprecated)manager.getCustomRepository())5. Entity Manager — 5 items
EntityManager.findByIds()EntityManager.ts:1285findBy+InPlainObjectToDatabaseEntityTransformer.ts:135,SubjectDatabaseEntityLoader.ts:118EntityManager.findOneById()EntityManager.ts:1366findOneByEntityManager.getCustomRepository()EntityManager.ts:1621Repository.extendDataSource.ts:503(deprecated)AbstractRepositorybranch)MongoEntityManager.findByIds()MongoEntityManager.ts:180findBySubjectDatabaseEntityLoader.ts:118MongoEntityManager.findOneById()MongoEntityManager.ts:263findOneBy6. Repository & BaseEntity — 7 items
Repository.exist()Repository.ts:499exists()manager.exists())Repository.findByIds()Repository.ts:625findBy+InSubjectDatabaseEntityLoader.ts(Mongo branch)manager.findByIds())Repository.findOneById()Repository.ts:657findOneBymanager.findOneById())MongoRepository.findByIds()MongoRepository.ts:137findBy+InSubjectDatabaseEntityLoader.ts:118manager.findByIds())MongoRepository.findOneById()MongoRepository.ts:166findOneBymanager.findOneById())BaseEntity.findByIds()BaseEntity.ts:532findBy+IngetRepository().findByIds())BaseEntity.findOneById()BaseEntity.ts:568findOneBygetRepository().findOneById())7. AbstractRepository — 1 item
AbstractRepositoryAbstractRepository.ts:19Repository.extendEntityManager.ts(import +instanceofcheck ingetCustomRepository)EntityManager.getCustomRepositorygetCustomRepository+EntityRepositorydecorator8. Decorators — 2 items
EntityRepositoryEntityRepository.ts:12Repository.extendentityRepositoriesmetadata pathRelationCountRelationCount.ts:11VirtualColumnRelationCountMetadataToAttributeTransformer,RelationCountMetadata)9. Query Builder — 6 items
setNativeParameters()QueryBuilder.ts:444setParametersSelectQueryBuilder.ts:3668(pagination)nativeParametersnativeParametersQueryExpressionMap.ts:341replacePropertyNames()QueryBuilder.ts:723replacePropertyNamesForTheWholeQueryonConflict()InsertQueryBuilder.ts:371orIgnore/orUpdateexpressionMap.onConflictconsumed at:563–564createInsertExpressionbranchorUpdate()(object overload)InsertQueryBuilder.ts:396.orUpdate(["col"], ["conflict_col"])!Array.isArraybranchWhereExpressionWhereExpressionBuilder.ts:144WhereExpressionBuilderextends)10. Find Options — 5 items
FindOneOptions.joinFindOneOptions.ts:53SelectQueryBuilder.ts:3411–3447handles itJoinOptionsJoinOptions.ts:35FindOneOptions.ts(type ofjoin)query-builder/JoinOptions.tsOrderByConditionOrderByCondition.ts:12QueryExpressionMap.orderBys, entity metadata, etc.)FindOptionsSelectByStringFindOptionsSelect.ts:43FindOptionsSelect(object form)FindOneOptions.ts:27,MongoEntityManager.ts:981Array.isArray()branches inSelectQueryBuilder.find({ select: ["name", "email"] })FindOptionsRelationByStringFindOptionsRelations.ts:43FindOptionsRelations(object form)FindOneOptions.ts:37Array.isArray()branches inSelectQueryBuilder.find({ relations: ["author"] })11. Lock Modes (comment-deprecated) — 2 items
These use
// deprecatedinline comments (not@deprecatedJSDoc), so they're invisible to TypeScript deprecation warnings."pessimistic_partial_write"SelectQueryBuilder.ts:1635,1661,2885;QueryExpressionMap.ts:200;FindOneOptions.ts:83pessimistic_write+onLocked: "skip_locked""pessimistic_write_or_fail"SelectQueryBuilder.ts:1636,1662,2896;QueryExpressionMap.ts:201;FindOneOptions.ts:84pessimistic_write+onLocked: "nowait"12. Column/Schema Options — 9 items
MySQL 8.0.17+ deprecated display width and zerofill at the database level. These properties are deeply embedded in TypeORM's schema generation.
ColumnNumericOptions.zerofillColumnNumericOptions.ts:26LPADfunctionColumnNumericOptions.unsignedColumnNumericOptions.ts:33ColumnOptions.widthColumnOptions.ts:32LPADfunctionColumnOptions.readonlyColumnOptions.ts:49update(inverted)ColumnOptions.zerofillColumnOptions.ts:115LPADfunctionColumnUnsignedOptions.widthColumnUnsignedOptions.ts:13LPADfunctionColumnUnsignedOptions.zerofillColumnUnsignedOptions.ts:24LPADfunctionPrimaryGeneratedColumnNumericOptions.zerofillPrimaryGeneratedColumnNumericOptions.ts:29LPADfunctionEntitySchemaColumnOptions.readonlyEntitySchemaColumnOptions.ts:88update(inverted)EntitySchemaTransformer.ts)13. Driver-specific Options — 22 items
SAP HANA (
SapConnectionOptions.ts)hanaClientDriverdriverSapDriver.ts(??fallback)pool.maxpool.maxConnectedOrPooledSapDriver.ts(??fallback)pool.minpool.maxWaitingRequestspool.requestTimeoutpool.maxWaitTimeoutIfPoolExhaustedSapDriver.ts(??fallback)pool.checkIntervalpool.idleTimeoutpool.maxPooledIdleTime(seconds, not ms)SapDriver.ts(divides by 1000)MongoDB (
MongoConnectionOptions.ts)keepAlivevalidOptionNamespassthroughkeepAliveInitialDelayvalidOptionNamespassthroughssltlsvalidOptionNamespassthroughsslCAtlsCAFilevalidOptionNamespassthroughsslCRLvalidOptionNamespassthroughsslCerttlsCertificateKeyFilevalidOptionNamespassthroughsslKeytlsCertificateKeyFilevalidOptionNamespassthroughsslPasstlsCertificateKeyFilePasswordvalidOptionNamespassthroughsslValidatetlsAllowInvalidCertificatesvalidOptionNamespassthroughwwriteConcernvalidOptionNamespassthroughwtimeoutMSwriteConcernvalidOptionNamespassthroughOther Drivers
Binary.SUBTYPE_UUID_OLDbson.typings.ts:18SUBTYPE_UUIDSqlServerCredentials.domainSqlServerConnectionCredentialsOptions.ts:66authentication/NtlmAuthenticationSqlServerDriver.tstranslates to NTLM authMysqlQueryRunner.isDefaultColumnWidth()MysqlQueryRunner.ts:3402loadTables()(2 internal refs)DriverUtils.buildColumnAlias()DriverUtils.ts:153buildAlias14. Misc — 5 items
EntityMetadata.createPropertyPath()EntityMetadata.ts:934QueryBuilderhas its ownQueryRunner.loadedTablesQueryRunner.ts:60getTables()RdbmsSchemaBuilder,BaseQueryRunner)RdbmsSchemaBuilderQueryRunner.loadedViewsQueryRunner.ts:67getViews()RdbmsSchemaBuilder,BaseQueryRunner)loadedTablesMigrationExecutor.getAllMigrations()MigrationExecutor.ts:98getMigrationsgetMigrations())Broadcaster.broadcastLoadEventsForAll()Broadcaster.ts:804broadcastLoadEventbroadcastLoadEvent())broadcastLoadForAllEventbut actual method isbroadcastLoadEventmichaelbromley commentedon Mar 10, 2026
Deprecated API Survey — TypeORM (2026-03-09)
Follow-up to the previous survey performed earlier. This documents what has been removed and what remains.
Summary
mastertoday@deprecatedJSDoc tags (excl. MongoDB typings)// deprecated)69 of the original 94 deprecated items will have been removed once the in-flight PRs merge. 25 will remain.
Items REMOVED Since Previous Survey
Already merged (58 items)
Phase 1 — Safe removals (all 41 removed)
All 41 items previously tagged "Safe" have been successfully removed:
src/globals.ts):getConnectionOptions,getConnectionManager,createConnection,createConnections,getConnection,getManager,getMongoManager,getSqljsManager,getRepository,getTreeRepository,getCustomRepository,getMongoRepository,createQueryBuilder— the file now only containsgetMetadataArgsStorage()UseContainerOptions,ContainedType,ContainerInterface,defaultContainer,useContainer— Note: these still exist incontainer.tsbut see "Still Present" sectionRepository.exist()— removed (only non-deprecatedexists()remains)WhereExpressioninterface — removed (replaced byWhereExpressionBuilder)InsertQueryBuilder.orUpdate()object-arg overload — removedpool.min,pool.maxWaitingRequests,pool.checkInterval— removedhanaClientDriver,pool.max,pool.requestTimeout— removedssl,sslCA,sslCRL,sslCert,sslKey,sslPass,sslValidate— still present inMongoDataSourceOptions.ts, see beloww,wtimeoutMS— still present, see belowBinary.SUBTYPE_UUID_OLD— still present inbson.typings.ts(upstream typing, excluded from count)DriverUtils.buildColumnAlias()— removedEntityMetadata.createPropertyPath()— removedMigrationExecutor.getAllMigrations()— removedBroadcaster.broadcastLoadEventsForAll()— removedPhase 2 — Moderate removals (17 of 28 removed)
DataSource.name,BaseDataSourceOptions.name,DataSource.isConnected,DataSource.connect(),DataSource.close(),DataSource.getCustomRepository()ConnectionManager— removedConnectionOptionstype alias — removedEntityManager.getCustomRepository()— removedQueryBuilder.replacePropertyNames()no-op stub — still present but no longer deprecated (the@deprecatedJSDoc remains, and it is still actively called ~20 times)InsertQueryBuilder.onConflict()— removedpessimistic_partial_write,pessimistic_write_or_fail— both removedColumnNumericOptions.unsigned,ColumnOptions.readonly,EntitySchemaColumnOptions.readonly— all removed (unsigned still exists as a non-deprecated property)pool.idleTimeout, MongoDBkeepAlive/keepAliveInitialDelay, SqlServerdomain— SAPpool.idleTimeoutremoved, SqlServerdomainremoved; MongoDBkeepAlive/keepAliveInitialDelaystill presentPhase 3 — Hard removals (partial)
Connectionclass,BaseConnectionOptions,ConnectionOptionsEnvReader—Connectionclass andBaseConnectionOptionsremoved.ConnectionOptionsEnvReadernever existed as a separate file (was part ofConnectionOptionsReader). However,getFromContainer()is still present and still used byConnectionMetadataBuilder.AbstractRepository,EntityRepositorydecorator — both removednativeParameters+setNativeParameters— both removedMysqlQueryRunner.isDefaultColumnWidth— all removed (zerofill/width no longer in decorator options;unsignedremains as a non-deprecated property)Removed by in-flight PR #12114 (10 items)
PR #12114 removes all
findByIdsvariants and refactors the two internal callers that were blocking removal:PlainObjectToDatabaseEntityTransformer→ now usescreateQueryBuilder().whereInIds().getMany()SubjectDatabaseEntityLoaderMongoDB path → now usescreateEntityCursorwith_id.$indirectlyEntityManager.findByIds()EntityManager.tsMongoEntityManager.findByIds()MongoEntityManager.tsRepository.findByIds()Repository.tsMongoRepository.findByIds()MongoRepository.tsBaseEntity.findByIds()BaseEntity.tsEntityManager.findOneById()EntityManager.tsMongoEntityManager.findOneById()MongoEntityManager.tsRepository.findOneById()Repository.tsMongoRepository.findOneById()MongoRepository.tsBaseEntity.findOneById()BaseEntity.tsThis resolves the
findByIdspersistence dependency chain, which was one of only 2 remaining hard blockers.Items STILL PRESENT After All PRs Merge (25 deprecated items)
Container Module — 6 items (src/container.ts)
UseContainerOptionsContainedType<T>getFromContainerContainerInterfacedefaultContainergetFromContaineruseContainer()getFromContainer()ConnectionMetadataBuilder.ts(lines 45, 68) — this is the last hard blockerStatus: The entire container module is deprecated but
getFromContainerstill has a non-deprecated caller.ConnectionMetadataBuilderneeds to be refactored to instantiate migrations/subscribers directly instead of going through the container.Query Builder — 2 items
replacePropertyNames()QueryBuilder.ts:706SelectQueryBuilder,UpdateQueryBuilder,SoftDeleteQueryBuilder, andQueryBuilderitself. The previous survey noted it as a "no-op stub" but it appears to be a real method now.OrderByConditionOrderByCondition.ts:9Find Options — 4 items
FindOneOptions.joinFindOneOptions.ts:50SelectQueryBuilderJoinOptionsJoinOptions.ts:32FindOneOptions.joinFindOptionsSelectByStringFindOptionsSelect.ts:43.find({ select: ["name"] })syntaxFindOptionsRelationByStringFindOptionsRelations.ts:43.find({ relations: ["author"] })syntaxRelationCount Decorator — 1 item
@RelationCount()RelationCount.ts:10QueryRunner Cache — 2 items
QueryRunner.loadedTablesQueryRunner.ts:57RdbmsSchemaBuilderQueryRunner.loadedViewsQueryRunner.ts:63RdbmsSchemaBuilderMongoDB Driver Options — 11 items (src/driver/mongodb/MongoDataSourceOptions.ts)
keepAlivekeepAliveInitialDelayssltlssslCAtlsCAFilesslCRLsslCerttlsCertificateKeyFilesslKeytlsCertificateKeyFilesslPasstlsCertificateKeyFilePasswordsslValidatetlsAllowInvalidCertificateswwriteConcernwtimeoutMSwriteConcernNote: These were listed as "Safe" in the previous survey but were not removed. They are all passthrough options to the MongoDB driver and removal is straightforward.
Remaining Blockers — Key Dependency Chains
Only 1 hard dependency chain remains (down from 4 in the original survey, 2 on current
master):The
findByIdspersistence chain, theEntityRepository/AbstractRepository/getCustomRepositorychain, and thenativeParameterschain have all been fully resolved.Recommended Next Steps
Immediate (Safe, no blockers)
Short-term (minor refactoring)
ConnectionMetadataBuilderto not usegetFromContainer(), then remove entirecontainer.ts(6 items)FindOneOptions.join+JoinOptions(2 items) — moderate effort, removeSelectQueryBuilderhandlingMedium-term (focused sub-projects)
@RelationCountdecorator — delete entire relation-count subsystemOrderByCondition— define a new type and update 9+ src/ filesQueryRunner.loadedTables/loadedViews— migrateRdbmsSchemaBuilderto usegetTables()/getViews()Needs Maintainer Decision (unchanged)
FindOptionsSelectByString— Is.find({ select: ["name"] })string-array syntax being removed in v1?FindOptionsRelationByString— Is.find({ relations: ["author"] })string-array syntax being removed in v1?replacePropertyNames()— Tagged deprecated but actively used ~20 times. Is this actually being removed or should the tag be dropped?Progress Summary
* ConnectionOptionsEnvReader was folded into ConnectionOptionsReader, not a separate deprecated item
Removal velocity
Of the 25 remaining, 11 are MongoDB passthrough options that could be removed in a single PR, which would bring the total down to 14 items (85% complete).
GM-Alex commentedon Mar 13, 2026
Will there be a replacement for the
JoinOptionsatFindOneOptions.join?alumni commentedon Mar 13, 2026
@GM-Alex at the moment we haven't merged that PR, we still have some debate about it, but the debate is rather about accepting
string[]forselect/relations. I would sayjoinwould be removed since it was long time deprecated and it would cause issues with type inference in the future.Usually
relationsshould cover it in most cases (the relation should be defined in the data model). There's also e.g.QueryBuilder.leftJoinAndMapMany, but I think you shouldn't have to use the QB methods in most cases.There's also PR #12064 that should also change the left outer joins to inner joins in case of non-nullable relations to improve performance (but would need some thorough review before merging).
Do you have a use case that can't be handled via
relations? I'd actually be curious how it looks like if you can share something :)