# 0.3.7 (opens new window) (2022-06-29)
# Bug Fixes
- add missing
enumName
support for EntitySchema (#9024 (opens new window)) (676fd1b (opens new window)) - add missing connect call on RedisQueryResultCache connect (#8894 (opens new window)) (7dfb69f (opens new window))
- add SET TRANSACTION AUTOCOMMIT DDL statements (SAP HANA) (#9020 (opens new window)) (cac648e (opens new window))
- call dataSource.destroy() only on initialized dataSource in CLI commands (#9146 (opens new window)) (a100a7a (opens new window))
- expo infinite loop on SAVEPOINT (#8984 (opens new window)) (ec23922 (opens new window))
- fixes recursive document to entity attributes mapping (#9050 (opens new window)) (40155d6 (opens new window)), closes #9049 (opens new window)
- log command error prior to calling destroy (#9135 (opens new window)) (bf17381 (opens new window))
- make soft-remove and recover events importable from index (#9110 (opens new window)) (e296126 (opens new window)), closes #9108 (opens new window)
- migration successful now displays name of the migration file (#8904 (opens new window)) (49cbe23 (opens new window))
- release newly created runner when no runner provided in DbQueryResultCache (#8969 (opens new window)) (ec05f1d (opens new window)), closes #4866 (opens new window)
- resolve cli init peer dependency issues (#8977 (opens new window)) (f7578d4 (opens new window)), closes #8975 (opens new window)
- resolve ESM module declaration file correctly (#9097 (opens new window)) (506133e (opens new window))
- support for TypeScript 4.8 (#9106 (opens new window)) (d924b70 (opens new window)), closes /github.com/microsoft/TypeScript/issues/49461#issuecomment-1154443477 (opens new window)
- update mssql peerDependency (#8887 (opens new window)) (9adab34 (opens new window))
- wrong entity transform of relation id when referenced column is a primary key (#8959 (opens new window)) (6e888dd (opens new window))
# Features
- add
for_key_share
("FOR KEY SHARE") lock mode for postgres driver (#8879 (opens new window)) (4687be8 (opens new window)), closes #8878 (opens new window) - add nativeBinding option to better-sqlite3 driver (#9157 (opens new window)) (bcdddc3 (opens new window))
- add spanner as a db option for the init command (#9121 (opens new window)) (e61cade (opens new window))
- allow explicitly named primary keys, foreign keys, and indices (#8900 (opens new window)) (78df84c (opens new window)), closes #1355 (opens new window)
- Cloud Spanner support (#8730 (opens new window)) (62518ae (opens new window))
- fix issues with generated columns and add support in other drivers (#8806 (opens new window)) (0418ebc (opens new window)), closes #8761 (opens new window)
- implement support for relationids in entity schemas (#9129 (opens new window)) (e24cced (opens new window))
- support TS 4.7+ node16/nodenext module mode (#9043 (opens new window)) (862a402 (opens new window))
- upgrade ioredis to v5 (#8997 (opens new window)) (723f1e5 (opens new window))
# Performance Improvements
- don't recompile escapeRegExp for every query (#8956 (opens new window)) (189592c (opens new window)), closes #8955 (opens new window)
- partially lift matching from regexp to js (#9032 (opens new window)) (bbdc20f (opens new window)), closes #3857 (opens new window) #8955 (opens new window) #8956 (opens new window) /github.com/typeorm/typeorm/issues/3857#issuecomment-699505893 (opens new window)
# 0.3.6 (opens new window) (2022-04-12)
# Features
- add
for_key_share
("FOR KEY SHARE") lock mode for postgres driver (#8879 (opens new window)) (4687be8 (opens new window)), closes #8878 (opens new window) - new driver: Cloud Spanner (#8730 (opens new window)) (62518ae (opens new window))
# 0.3.5 (opens new window) (2022-04-05)
# Bug Fixes
.save
repository method not returning generated uuids for aurora-postgres (#8825 (opens new window)) (ed06f4c (opens new window))- allow hstore type to use transformers in driver postgres (#8823 (opens new window)) (b1a0107 (opens new window))
- broken shebang parameters of
cli-ts-node-commonjs
andcli-ts-node-esm
on some linux distros (#8821 (opens new window)) (c5dfc11 (opens new window)), closes #8818 (opens new window) - find select object api should support false values #8796 (opens new window) (#8807 (opens new window)) (9ac8e9e (opens new window))
- resolve missing ConnectionOptions export in index.ts (#8850 (opens new window)) (1693a17 (opens new window)), closes #8837 (opens new window)
- save correct discriminator with STI (#8819 (opens new window)) (9d1e246 (opens new window)), closes #2927 (opens new window)
- Update DeepPartial for usage of generics with Repository class (#8817 (opens new window)) (8ba742e (opens new window))
- fixed issue with
typeorm init
command (#8820 (opens new window))
# 0.3.4 (opens new window) (2022-03-26)
# Bug Fixes
- BaseEntity.reload method regression and made
findOne
to throw error on missing conditions in runtime (#8801 (opens new window)) (ee8c1ec (opens new window)) - improve DeepPartial recursion (#8732 (opens new window)) (0494008 (opens new window)), closes #8681 (opens new window)
- missing timestamp in created migrations filenames (#8802 (opens new window)) (ceee439 (opens new window))
- PoolConnection leaked by MysqlDriver (#8803 (opens new window)) (d2cfd22 (opens new window))
- remove console.log calls from SelectQueryBuilder (#8795 (opens new window)) (54c7db4 (opens new window)), closes #8792 (opens new window)
- stop crashing when redis is offline and ignoreErrors on cache options is set (#8725 (opens new window)) (edc39d1 (opens new window))
# Features
- add support for insert with alias (#4003 (opens new window)) (#8791 (opens new window)) (4b37030 (opens new window))
- applicationName parameter for CockroachDB (#8800 (opens new window)) (79b7f5c (opens new window))
# 0.3.3 (opens new window) (2022-03-23)
# Bug Fixes
- improve initialization of custom repository (#8782 (opens new window)) (52a641c (opens new window))
- resolve entities correctly in datasource when globs are specified (#8778 (opens new window)) (a641c5d (opens new window))
# Features
- support for Common Table Expressions (#8534 (opens new window)) (7cc1848 (opens new window)), closes #1116 (opens new window) #5899 (opens new window) #4753 (opens new window)
# 0.3.2 (opens new window) (2022-03-22)
# Bug Fixes
- broken CLI in ESM projects since version 0.3.0 (#8773 (opens new window)) (97699e8 (opens new window))
# Features
- add typeorm CLI variations that include
ts-node
(#8776 (opens new window)) (05fc744 (opens new window)) - allows user to specify which mysql package should be used (#8771 (opens new window)) (35106df (opens new window))
# Reverts
- json/jsonb change introduced in 0.3.1 (#8777 (opens new window)) (edf27d9 (opens new window))
# 0.3.1 (opens new window) (2022-03-21)
# Bug Fixes
- bugfixes introduced in 0.3.0 (#8764 (opens new window)) (d61f857 (opens new window)), closes #8762 (opens new window) #8759 (opens new window) #8758 (opens new window) #8757 (opens new window)
# Features
- new array find operators (
ArrayContains
,ArrayContainedBy
,ArrayOverlap
) (#8766 (opens new window)) (9f1b8e3 (opens new window)):
# BREAKING CHANGES
- we do not call JSON.stringify() to json/jsonb column types in Postgres. Instead, we delegate value directly to underlying pg driver. This is a correct way of handling jsons.
- array: true must be explicitly defined for array json/jsonb values
- strings being JSON-stringified must be manually escaped
# 0.3.0 (opens new window) (2022-03-17)
Changes in the version includes changes from the next
branch and typeorm@next
version.
They were pending their migration from 2018. Finally, they are in the master branch and master version.
# Features
compilation
target
now ises2020
. This requires Node.JS version14+
TypeORM now properly works when installed within different node_modules contexts (often happen if TypeORM is a dependency of another library or TypeORM is heavily used in monorepo projects)
Connection
was renamed toDataSource
. OldConnection
is still there, but now it's deprecated. It will be completely removed in next version. New API:
export const dataSource = new DataSource({
// ... options ...
})
// load entities, establish db connection, sync schema, etc.
await dataSource.connect()
2
3
4
5
6
Previously, you could use new Connection()
, createConnection()
, getConnectionManager().create()
, etc.
They all deprecated in favour of new syntax you can see above.
New way gives you more flexibility and simplicity in usage.
- new custom repositories syntax:
export const UserRepository = myDataSource.getRepository(UserEntity).extend({
findUsersWithPhotos() {
return this.find({
relations: {
photos: true
}
})
}
})
2
3
4
5
6
7
8
9
Old ways of custom repository creation were dropped.
added new option on relation load strategy called
relationLoadStrategy
. Relation load strategy is used on entity load and determines how relations must be loaded when you query entities and their relations from the database. Used onfind*
methods andQueryBuilder
. Value can be set tojoin
orquery
.join
- loads relations using SQLJOIN
expressionquery
- executes separate SQL queries for each relation
Default is join
, but default can be set in ConnectionOptions
:
createConnection({
/* ... */
relationLoadStrategy: "query"
})
2
3
4
Also, it can be set per-query in find*
methods:
userRepository.find({
relations: {
photos: true
}
})
2
3
4
5
And QueryBuilder:
userRepository
.createQueryBuilder()
.setRelationLoadStrategy("query")
2
3
For queries returning big amount of data, we recommend to use query
strategy,
because it can be a more performant approach to query relations.
- added new
findOneBy
,findOneByOrFail
,findBy
,countBy
,findAndCountBy
methods toBaseEntity
,EntityManager
andRepository
:
const users = await userRepository.findBy({
name: "Michael"
})
2
3
Overall find*
and count*
method signatures where changed, read the "breaking changes" section for more info.
- new
select
type signature inFindOptions
(used infind*
methods):
userRepository.find({
select: {
id: true,
firstName: true,
lastName: true,
}
})
2
3
4
5
6
7
Also, now it's possible to specify select columns of the loaded relations:
userRepository.find({
select: {
id: true,
firstName: true,
lastName: true,
photo: {
id: true,
filename: true,
album: {
id: true,
name: true,
}
}
}
})
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- new
relations
type signature inFindOptions
(used infind*
methods):
userRepository.find({
relations: {
contacts: true,
photos: true,
}
})
2
3
4
5
6
To load nested relations use a following signature:
userRepository.find({
relations: {
contacts: true,
photos: {
album: true,
},
}
})
2
3
4
5
6
7
8
- new
order
type signature inFindOptions
(used infind*
methods):
userRepository.find({
order: {
id: "ASC"
}
})
2
3
4
5
Now supports nested order by-s:
userRepository.find({
order: {
photos: {
album: {
name: "ASC"
},
},
}
})
2
3
4
5
6
7
8
9
- new
where
type signature inFindOptions
(used infind*
methods) now allows to build nested statements with conditional relations, for example:
userRepository.find({
where: {
photos: {
album: {
name: "profile"
}
}
}
})
2
3
4
5
6
7
8
9
Gives you users who have photos in their "profile" album.
FindOperator
-s can be applied for relations inwhere
statement, for example:
userRepository.find({
where: {
photos: MoreThan(10),
}
})
2
3
4
5
Gives you users with more than 10 photos.
boolean
can be applied for relations inwhere
statement, for example:
userRepository.find({
where: {
photos: true
}
})
2
3
4
5
# BREAKING CHANGES
minimal Node.JS version requirement now is
14+
drop
ormconfig
support.ormconfig
still works if you use deprecated methods, however we do not recommend using it anymore, because it's support will be completely dropped in0.4.0
. If you want to have your connection options defined in a separate file, you can still do it like this:
import ormconfig from "./ormconfig.json"
const MyDataSource = new DataSource(require("./ormconfig.json"))
2
3
Or even more type-safe approach with resolveJsonModule
in tsconfig.json
enabled:
import ormconfig from "./ormconfig.json"
const MyDataSource = new DataSource(ormconfig)
2
3
But we do not recommend use this practice, because from 0.4.0
you'll only be able to specify entities / subscribers / migrations using direct references to entity classes / schemas (see "deprecations" section).
We won't be supporting all ormconfig
extensions (e.g. json
, js
, ts
, yaml
, xml
, env
).
support for previously deprecated
migrations:*
commands was removed. Usemigration:*
commands instead.all commands were re-worked. Please refer to new CLI documentation.
cli
option fromBaseConnectionOptions
(nowBaseDataSourceOptions
options) was removed (since CLI commands were re-worked).now migrations are running before schema synchronization if you have both pending migrations and schema synchronization pending (it works if you have both
migrationsRun
andsynchronize
enabled in connection options).aurora-data-api
driver now is calledaurora-mysql
aurora-data-api-pg
driver now is calledaurora-postgres
EntityManager.connection
is nowEntityManager.dataSource
Repository
now has a constructor (breaks classes extending Repository with custom constructor)@TransactionRepository
,@TransactionManager
,@Transaction
decorators were completely removed. These decorators do the things out of the TypeORM scope.Only junction table names shortened.
MOTIVATION: We must shorten only table names generated by TypeORM.
It's user responsibility to name tables short if their RDBMS limit table name length
since it won't make sense to have table names as random hashes.
It's really better if user specify custom table name into @Entity
decorator.
Also, for junction table it's possible to set a custom name using @JoinTable
decorator.
findOne()
signature without parameters was dropped. If you need a single row from the db you can use a following syntax:
const [user] = await userRepository.find()
This change was made to prevent user confusion. See this issue (opens new window) for details.
findOne(id)
signature was dropped. Use following syntax instead:
const user = await userRepository.findOneBy({
id: id // where id is your column name
})
2
3
This change was made to provide a more type-safe approach for data querying. Due to this change you might need to refactor the way you load entities using MongoDB driver.
findOne
,findOneOrFail
,find
,count
,findAndCount
methods now only acceptFindOptions
as parameter, e.g.:
const users = await userRepository.find({
where: { /* conditions */ },
relations: { /* relations */ }
})
2
3
4
To supply where
conditions directly without FindOptions
new methods were added:
findOneBy
, findOneByOrFail
, findBy
, countBy
, findAndCountBy
. Example:
const users = await userRepository.findBy({
name: "Michael"
})
2
3
This change was required to simply current find*
and count*
methods typings,
improve type safety and prevent user confusion.
findByIds
was deprecated, usefindBy
method instead in conjunction withIn
operator, for example:
userRepository.findBy({
id: In([1, 2, 3])
})
2
3
This change was made to provide a more type-safe approach for data querying.
findOne
andQueryBuilder.getOne()
now returnnull
instead ofundefined
in the case if it didn't find anything in the database. Logically it makes more sense to returnnull
.findOne
now limits returning rows to 1 at database level.
NOTE: FOR UPDATE
locking does not work with findOne
in Oracle since FOR UPDATE
cannot be used with FETCH NEXT
in a single query.
where
inFindOptions
(e.g.find({ where: { ... })
) is more sensitive to input criteria now.FindConditions
(where
inFindOptions
) was renamed toFindOptionsWhere
.null
as value inwhere
used infind*
methods is not supported anymore. Now you must explicitly useIsNull()
operator.
Before:
userRepository.find({
where: {
photo: null
}
})
2
3
4
5
After:
userRepository.find({
where: {
photo: IsNull()
}
})
2
3
4
5
This change was made to make it more transparent on how to add "IS NULL" statement to final SQL, because before it bring too much confusion for ORM users.
- if you had entity properties of a non-primitive type (except Buffer) defined as columns,
then you won't be able to use it in
find*
'swhere
. Example:
Before for the @Column(/*...*/) membership: MembershipKind
you could have a query like:
userRepository.find({
membership: new MembershipKind("premium")
})
2
3
now, you need to wrap this value into Equal
operator:
userRepository.find({
membership: Equal(new MembershipKind("premium"))
})
2
3
This change is due to type-safety improvement new where
signature brings.
order
inFindOptions
(used infind*
methods) doesn't support ordering by relations anymore. Define relation columns, and order by them instead.where
inFindOptions
(used infind*
methods) previously supportedObjectLiteral
andstring
types. Now both signatures were removed. ObjectLiteral was removed because it seriously breaks the type safety, andstring
doesn't make sense in the context ofFindOptions
. UseQueryBuilder
instead.MongoRepository
andMongoEntityManager
now use new types calledMongoFindManyOptions
andMongoFindOneOptions
for theirfind*
methods.primary relation
(e.g.@ManyToOne(() => User, { primary: true }) user: User
) support is removed. You still have an ability to use foreign keys as your primary keys, however now you must explicitly define a column marked as primary.
Example, before:
@ManyToOne(() => User, { primary: true })
user: User
2
Now:
@PrimaryColumn()
userId: number
@ManyToOne(() => User)
user: User
2
3
4
5
Primary column name must match the relation name + join column name on related entity. If related entity has multiple primary keys, and you want to point to multiple primary keys, you can define multiple primary columns the same way:
@PrimaryColumn()
userFirstName: string
@PrimaryColumn()
userLastName: string
@ManyToOne(() => User)
user: User
2
3
4
5
6
7
8
This change was required to simplify ORM internals and introduce new features.
prefix relation id columns contained in embedded entities (#7432 (opens new window))
find by Date object in sqlite driver (#7538 (opens new window))
issue with non-reliable
new Date(ISOString)
parsing (#7796 (opens new window))
# DEPRECATIONS
all CLI commands do not support
ormconfig
anymore. You must specify a file with data source instance instead.entities
,migrations
,subscribers
options insideDataSourceOptions
acceptingstring
directories support is deprecated. You'll be only able to pass entity references in the future versions.all container-related features (
UseContainerOptions
,ContainedType
,ContainerInterface
,defaultContainer
,useContainer
,getFromContainer
) are deprecated.EntityManager's
getCustomRepository
used within transactions is deprecated. UsewithRepository
method instead.Connection.isConnected
is deprecated. Use.isInitialized
instead.select
inFindOptions
(used infind*
methods) used as an array of property names is deprecated. Now you should use a new object-literal notation. Example:
Deprecated way of loading entity relations:
userRepository.find({
select: ["id", "firstName", "lastName"]
})
2
3
New way of loading entity relations:
userRepository.find({
select: {
id: true,
firstName: true,
lastName: true,
}
})
2
3
4
5
6
7
This change is due to type-safety improvement new select
signature brings.
relations
inFindOptions
(used infind*
methods) used as an array of relation names is deprecated. Now you should use a new object-literal notation. Example:
Deprecated way of loading entity relations:
userRepository.find({
relations: ["contacts", "photos", "photos.album"]
})
2
3
New way of loading entity relations:
userRepository.find({
relations: {
contacts: true,
photos: {
album: true
}
}
})
2
3
4
5
6
7
8
This change is due to type-safety improvement new relations
signature brings.
join
inFindOptions
(used infind*
methods) is deprecated. UseQueryBuilder
to build queries containing manual joins.Connection
,ConnectionOptions
are deprecated, new names to use are:DataSource
andDataSourceOptions
. To create the same connection you had before use a new syntax:new DataSource({ /*...*/ })
.createConnection()
,createConnections()
are deprecated, sinceConnection
is calledDataSource
now, to create a connection and connect to the database simply do:
const myDataSource = new DataSource({ /*...*/ })
await myDataSource.connect()
2
getConnection()
is deprecated. To have a globally accessible connection, simply export your data source and use it in places you need it:
export const myDataSource = new DataSource({ /*...*/ })
// now you can use myDataSource anywhere in your application
2
getManager()
,getMongoManager()
,getSqljsManager()
,getRepository()
,getTreeRepository()
,getMongoRepository()
,createQueryBuilder()
are all deprecated now. Use globally accessible data source instead:
export const myDataSource = new DataSource({ /*...*/ })
export const Manager = myDataSource.manager
export const UserRepository = myDataSource.getRepository(UserEntity)
export const PhotoRepository = myDataSource.getRepository(PhotoEntity)
// ...
2
3
4
5
getConnectionManager()
andConnectionManager
itself are deprecated - nowConnection
is calledDataSource
, and each data source can be defined in exported variable. If you want to have a collection of data sources, just define them in a variable, simply as:
const dataSource1 = new DataSource({ /*...*/ })
const dataSource2 = new DataSource({ /*...*/ })
const dataSource3 = new DataSource({ /*...*/ })
export const MyDataSources = {
dataSource1,
dataSource2,
dataSource3,
}
2
3
4
5
6
7
8
9
getConnectionOptions()
is deprecated - in next version we are going to implement different mechanism of connection options loadingAbstractRepository
is deprecated. Use new way of custom repositories creation.Connection.name
andBaseConnectionOptions.name
are deprecated. Connections don't need names anymore since we are going to drop all related methods relying on this property.all deprecated signatures will be removed in
0.4.0
# EXPERIMENTAL FEATURES NOT PORTED FROM NEXT BRANCH
observers
- we will consider returning them back with new API in future versionsalternative find operators
- using$any
,$in
,$like
and other operators inwhere
condition.
# 0.2.45 (opens new window) (2022-03-04)
# Bug Fixes
- allow clearing database inside a transaction (#8712 (opens new window)) (f3cfdd2 (opens new window)), closes #8527 (opens new window)
- discard duplicated columns on update (#8724 (opens new window)) (0fc093d (opens new window)), closes #8723 (opens new window)
- fix entityManager.getId for custom join table (#8676 (opens new window)) (33b2bd7 (opens new window)), closes #7736 (opens new window)
- force web bundlers to ignore index.mjs and use the browser ESM version directly (#8710 (opens new window)) (411fa54 (opens new window)), closes #8709 (opens new window)
# Features
- add nested transaction (#8541 (opens new window)) (6523526 (opens new window)), closes #1505 (opens new window)
- add transformer to ViewColumnOptions (#8717 (opens new window)) (96ac8f7 (opens new window))
# 0.2.44 (opens new window) (2022-02-23)
# Bug Fixes
- alter relation loader to use transforms when present (#8691 (opens new window)) (2c2fb29 (opens new window)), closes #8690 (opens new window)
- cannot read properties of undefined (reading 'joinEagerRelations') (136015b (opens new window))
- expo driver doesn't work properly because of new beforeMigration() afterMigration() callbacks (#8683 (opens new window)) (5a71803 (opens new window))
- ng webpack default import (#8688 (opens new window)) (2d3374b (opens new window)), closes #8674 (opens new window)
- support imports of absolute paths of ESM files on Windows (#8669 (opens new window)) (12cbfcd (opens new window)), closes #8651 (opens new window)
# Features
- add option to upsert to skip update if the row already exists and no values would be changed (#8679 (opens new window)) (8744395 (opens new window))
- allow
{delete,insert}().returning()
on MariaDB (#8673 (opens new window)) (7facbab (opens new window)), closes #7235 (opens new window) #7235 (opens new window) - Implement deferrable foreign keys for SAP HANA (#6104 (opens new window)) (1f54c70 (opens new window))
# 0.2.43 (opens new window) (2022-02-17)
# Bug Fixes
- support
require
to internal files without explicitly writing.js
in the path (#8660 (opens new window)) (96aed8a (opens new window)), closes #8656 (opens new window)
# Features
- embedded entities with entity schema (#8626 (opens new window)) (7dbe956 (opens new window)), closes #3632 (opens new window)
# Reverts
- Revert "feat: soft delete recursive cascade (#8436)" (#8654) (6b0b15b (opens new window)), closes #8436 (opens new window) #8654 (opens new window)
# 0.2.42 (opens new window) (2022-02-16)
# Bug Fixes
- proper column comment mapping from database to metadata in aurora-data-api (baa5880 (opens new window))
- add referencedSchema to PostgresQueryRunner (#8566 (opens new window)) (c490319 (opens new window))
- adding/removing @Generated() will now generate a migration to add/remove the DEFAULT value (#8274 (opens new window)) (4208393 (opens new window)), closes #5898 (opens new window)
- adds entity-schema support for createForeignKeyConstraints (#8606 (opens new window)) (f224f24 (opens new window)), closes #8489 (opens new window)
- allow special keyword as column name for simple-enum type on sqlite (#8645 (opens new window)) (93bf96e (opens new window))
- correctly handle multiple-row insert for SAP HANA driver (#7957 (opens new window)) (8f2ae71 (opens new window))
- disable SQLite FK checks in synchronize / migrations (#7922 (opens new window)) (f24822e (opens new window))
- find descendants of a non-existing tree parent (#8557 (opens new window)) (cbb61eb (opens new window)), closes #8556 (opens new window)
- For MS SQL Server use lowercase "sys"."columns" reference. (#8400 (opens new window)) (#8401 (opens new window)) (e8a0f92 (opens new window))
- improve DeepPartial type (#8187 (opens new window)) (b93416d (opens new window))
- Lock peer dependencies versions (#8597 (opens new window)) (600bd4e (opens new window))
- make EntityMetadataValidator comply with entitySkipConstructor, cover with test (#8445 (opens new window)) (3d6c5da (opens new window)), closes #8444 (opens new window)
- materialized path being computed as "undefined1." (#8526 (opens new window)) (09f54e0 (opens new window))
- MongoConnectionOptions sslCA type mismatch (#8628 (opens new window)) (02400da (opens new window))
- mongodb repository.find filters soft deleted rows (#8581 (opens new window)) (f7c1f7d (opens new window)), closes #7113 (opens new window)
- mongodb@4 compatibility support (#8412 (opens new window)) (531013b (opens new window))
- must invoke key pragma before any other interaction if SEE setted (#8478 (opens new window)) (546b3ed (opens new window)), closes #8475 (opens new window)
- nested eager relations in a lazy-loaded entity are not loaded (#8564 (opens new window)) (1cfd7b9 (opens new window))
- QueryFailedError when tree entity with JoinColumn (#8443 (opens new window)) (#8447 (opens new window)) (a11c50d (opens new window))
- relation id and afterAll hook performance fixes (#8169 (opens new window)) (31f0b55 (opens new window))
- replaced custom uuid generator with
uuid
library (#8642 (opens new window)) (8898a71 (opens new window)) - single table inheritance returns the same discriminator value error for unrelated tables where their parents extend from the same entity (#8525 (opens new window)) (6523fcc (opens new window)), closes #8522 (opens new window)
- updating with only
update: false
columns shouldn't trigger @UpdateDateColumn column updation (2834729 (opens new window)), closes #8394 (opens new window) #8394 (opens new window) #8394 (opens new window) - upsert should find unique index created by one-to-one relation (#8618 (opens new window)) (c8c00ba (opens new window))
# Features
- add comment param to FindOptions (#8545 (opens new window)) (ece0da0 (opens new window))
- add custom timestamp option in migration creation (#8501 (opens new window)) (4a7f242 (opens new window)), closes #8500 (opens new window) #8500 (opens new window)
- add support for node-redis v4.0.0 and newer (#8425 (opens new window)) (0626ed1 (opens new window))
- add support for Postgres 10+ GENERATED ALWAYS AS IDENTITY (#8371 (opens new window)) (a0f09de (opens new window)), closes #8370 (opens new window)
- add WITH (lock) clause for MSSQL select with join queries (#8507 (opens new window)) (3284808 (opens new window)), closes #4764 (opens new window)
- adds entity-schema support for withoutRowid (#8432 (opens new window)) (bd22dc3 (opens new window)), closes #8429 (opens new window)
- allow soft-deletion of orphaned relation rows using orphanedRow… (#8414 (opens new window)) (cefddd9 (opens new window))
- custom name for typeorm_metadata table (#8528 (opens new window)) (f8154eb (opens new window)), closes #7266 (opens new window)
- deferrable option for Unique constraints (Postgres) (#8356 (opens new window)) (e52b26c (opens new window))
- ESM support (#8536 (opens new window)) (3a694dd (opens new window)), closes #6974 (opens new window) #6941 (opens new window) #7516 (opens new window) #7159 (opens new window)
- query builder negating with "NotBrackets" for complex expressions (#8476 (opens new window)) (fe7f328 (opens new window))
- separate update events into update, soft-remove, and recover (#8403 (opens new window)) (93383bd (opens new window)), closes #8398 (opens new window)
- soft delete recursive cascade (#8436 (opens new window)) (d0f32b3 (opens new window))
- sqlite attach (#8396 (opens new window)) (9e844d9 (opens new window))
# Reverts
- migration:show command must exist with zero status code (Fixes #7349 (opens new window)) (#8185 (opens new window)) (e0adeee (opens new window))
# BREAKING CHANGES
- update listeners and subscriber no longer triggered by soft-remove and recover
# 0.2.41 (opens new window) (2021-11-18)
# Bug Fixes
- add
retryWrites
toMongoConnectionOptions
(#8354 (opens new window)) (c895680 (opens new window)), closes #7869 (opens new window) - create typeorm_metadata table when running migrations (#4956 (opens new window)) (b2c8168 (opens new window))
- db caching won't work with replication enabled (#7694 (opens new window)) (2d0abe7 (opens new window)), closes #5919 (opens new window)
- incorrect composite
UNIQUE
constraints detection (#8364 (opens new window)) (29cb891 (opens new window)), closes #8158 (opens new window) - Postgres enum generates unnecessary queries on schema sync (#8268 (opens new window)) (98d5f39 (opens new window))
- resolve issue delete column null on after update event subscriber (#8318 (opens new window)) (8a5e671 (opens new window)), closes #6327 (opens new window)
# Features
- export interfaces from schema-builder/options (#8383 (opens new window)) (7b8a1e3 (opens new window))
- implement generated columns for postgres 12 driver (#6469 (opens new window)) (91080be (opens new window))
- lock modes in cockroachdb (#8250 (opens new window)) (d494fcc (opens new window)), closes #8249 (opens new window)
# 0.2.40 (opens new window) (2021-11-11)
# Bug Fixes
- BaseEntity finder methods to properly type-check lazy relations conditions (#5710 (opens new window)) (0665ff5 (opens new window))
# Features
- add depth limiter optional parameter when loading nested trees using TreeRepository's findTrees() and findDescendantsTree() (#7926 (opens new window)) (0c44629 (opens new window)), closes #3909 (opens new window)
- add upsert methods for the drivers that support onUpdate (#8104 (opens new window)) (3f98197 (opens new window)), closes #2363 (opens new window)
- Postgres IDENTITY Column support (#7741 (opens new window)) (969af95 (opens new window))
# Reverts
- "feat: use char(36) for uuid representation in mysql (#7853 (opens new window))" (#8343 (opens new window)) (1588c58 (opens new window))
- regression in ordering by the relation property (#8346 (opens new window)) (#8352 (opens new window)) (0334d10 (opens new window)), closes #3736 (opens new window) #8118 (opens new window)
# 0.2.39 (opens new window) (2021-11-09)
# Bug Fixes
- attach FOR NO KEY UPDATE lock to query if required (#8008 (opens new window)) (9692930 (opens new window)), closes #7717 (opens new window)
- cli should accept absolute paths for --config (4ad3a61 (opens new window))
- create a different cacheId if present for count query in getManyAndCount (#8283 (opens new window)) (9f14e48 (opens new window)), closes #4277 (opens new window)
- defaults type cast filtering in Cockroachdb (#8144 (opens new window)) (28c183e (opens new window)), closes #7110 (opens new window) #7110 (opens new window)
- do not generate migration for unchanged enum column (#8161 (opens new window)) (#8164 (opens new window)) (4638dea (opens new window))
- NativescriptQueryRunner's query method fails when targeting es2017 (#8182 (opens new window)) (8615733 (opens new window))
- OneToManySubjectBuilder bug with multiple primary keys (#8221 (opens new window)) (6558295 (opens new window))
- ordering by joined columns for PostgreSQL (#3736 (opens new window)) (#8118 (opens new window)) (1649882 (opens new window))
- support DeleteResult in SQLiteDriver (#8237 (opens new window)) (b678807 (opens new window))
# Features
- add
typeorm
command wrapper to package.json in project template (#8081 (opens new window)) (19d4a91 (opens new window)) - add dependency configuraiton for views #8240 (opens new window) (#8261 (opens new window)) (2c861af (opens new window))
- add relation options to all tree queries (#8080 (opens new window)) (e4d4636 (opens new window)), closes #8076 (opens new window)
- add the ability to pass the driver into all database types (#8259 (opens new window)) (2133ffe (opens new window))
- more informative logging in case of migration failure (#8307 (opens new window)) (dc6f1c9 (opens new window))
- support using custom index with SelectQueryBuilder in MySQL (#7755 (opens new window)) (f79ae58 (opens new window))
# Reverts
- Revert "fix: STI types on children in joins (#3160)" (#8309) (0adad88 (opens new window)), closes #3160 (opens new window) #8309 (opens new window)
# 0.2.38 (opens new window) (2021-10-02)
# Bug Fixes
- prevent using absolute table path in migrations unless required (#8038 (opens new window)) (e9366b3 (opens new window))
- snakecase conversion for strings with numbers (#8111 (opens new window)) (749511d (opens new window))
- use full path for table lookups (#8097 (opens new window)) (22676a0 (opens new window))
# Features
- support QueryRunner.stream with Oracle (#8086 (opens new window)) (b858f84 (opens new window))
# 0.2.37 (opens new window) (2021-08-13)
# Bug Fixes
- allow periods in parameter identifiers (#8022 (opens new window)) (4201938 (opens new window))
- ConnectionManager
connections
property should include list ofConnection
s (#8004 (opens new window)) (2344db6 (opens new window)) - entity value for date columns that are related (#8027 (opens new window)) (5a3767f (opens new window))
- handle brackets when only one condition is passed (#8048 (opens new window)) (ab39066 (opens new window))
- handle enums with multiple apostrophes in MySQL (#8013 (opens new window)) (37c40a6 (opens new window)), closes #8011 (opens new window)
- include all drivers in driverfactory error message (#8061 (opens new window)) (fbd1ef7 (opens new window))
- resolve not returning soft deleted relations with withDeleted find option (#8017 (opens new window)) (65cbcc7 (opens new window))
- SAP HANA inserts used incorrect value for returning query (#8072 (opens new window)) (36398db (opens new window))
- some drivers set the wrong database name when defined from url (#8058 (opens new window)) (a3a3284 (opens new window))
- throw error when not connected in drivers (#7995 (opens new window)) (cd71f62 (opens new window))
# Features
- add relations option to tree queries (#7981 (opens new window)) (ca26297 (opens new window)), closes #7974 (opens new window) #4564 (opens new window)
- add serviceName option for oracle connections (#8021 (opens new window)) (37bd012 (opens new window))
- add support to string array on dropColumns (#7654 (opens new window)) (91d5b2f (opens new window))
- support Oracle Implicit Results (#8050 (opens new window)) (fe78bee (opens new window))
# 0.2.36 (opens new window) (2021-07-31)
# Bug Fixes
- add deprecated
WhereExpression
alias forWhereExpressionBuilder
(#7980 (opens new window)) (76e7ed9 (opens new window)) - always generate migrations with template string literals (#7971 (opens new window)) (e9c2af6 (opens new window))
- use js rather than ts in all
browser
package manifests (#7982 (opens new window)) (0d90bcd (opens new window)) - use nvarchar/ntext during transit for SQLServer queries (#7933 (opens new window)) (62d7976 (opens new window))
# Features
- add postgres connection option
applicationName
(#7989 (opens new window)) (d365acc (opens new window))
# 0.2.35 (opens new window) (2021-07-28)
# Bug Fixes
entity
to bePartial<Entity>
|undefined
inUpdateEvent
(#7783 (opens new window)) (f033045 (opens new window))- actually return a working ReadStream from SQL Server query runner (#7893 (opens new window)) (e80985f (opens new window))
- added version check before dropping materialized views to keep backward compatibility (#7716 (opens new window)) (29f1f86 (opens new window))
- allow for string id in mongo.findByIds call (#7838 (opens new window)) (4b45ae1 (opens new window))
- better support of relation-based properties in where clauses (#7805 (opens new window)) (3221c50 (opens new window))
- Buffer in primary columns causes bugs with relations (#7952 (opens new window)) (37e08a7 (opens new window)), closes #4060 (opens new window)
- capacitor does not correctly set journal mode (#7873 (opens new window)) (5f20eb7 (opens new window))
- Capacitor driver PRAGMA requests failing on Android (#7728 (opens new window)) (9620a26 (opens new window))
- condition is optional in SelectQueryBuilder joins (#7888 (opens new window)) (2deaa0e (opens new window))
- correctly handle mongo replica set driver option (#7908 (opens new window)) (9212df4 (opens new window))
- correctly load yml in ConnectionOptionsYmlReader (#7743 (opens new window)) (57f9254 (opens new window))
- craft oracle connectString as a descriptor with SID (#7878 (opens new window)) (b05d093 (opens new window))
- delete operation in MongoDB impact all matched documents (#7811 (opens new window)) (0fbae53 (opens new window)), closes #7809 (opens new window)
- Do not add NULL/NOT NULL for stored columns (#7708 (opens new window)) (3c33e9f (opens new window)), closes #7698 (opens new window)
- do OBJECT_ID lookup for column constraint instead of name in mssql (#7916 (opens new window)) (fa8c1b0 (opens new window))
- drop pool.autostart from mssql options because it's unused (#7877 (opens new window)) (0d21a4d (opens new window))
- drop SAP statement after
prepare
per Hana client docs (#7748 (opens new window)) (8ca05b1 (opens new window)) - eager relation respects children relations (#5685 (opens new window)) (e7e887a (opens new window))
- enable returning additional columns with MSSQL (#7864 (opens new window)) (e1db48d (opens new window))
- entity object undefined in
afterUpdate
subscriber (#7724 (opens new window)) (d25304d (opens new window)) - find operation in MongoDB do not include nullable values from documents (#7820 (opens new window)) (98c13cf (opens new window)), closes #7760 (opens new window)
- fix table loading when schemas are used (3a106a3 (opens new window))
- foreign keys in SAP were loading from the wrong table (#7914 (opens new window)) (4777a79 (opens new window))
- handle postgres default when tableColumn.default is not string (#7816 (opens new window)) (0463855 (opens new window))
- handle snake case of ABcD which should become a_bc_d (#7883 (opens new window)) (eb680f9 (opens new window))
- improve query for MSSQL to fetch foreign keys and tables (#7935 (opens new window)) (f6af01a (opens new window))
- make
OracleQueryRunner
createDatabase if-not-exists not fail (f5a80ef (opens new window)) - only pass
data
from SaveOptions during that query (#7886 (opens new window)) (1de2e13 (opens new window)) - oracle cannot support DB in table identifiers (#7954 (opens new window)) (8c60d91 (opens new window))
- pass table to namingstrategy when we can instead of table name (#7925 (opens new window)) (140002d (opens new window))
- prevent modification of the FindOptions.relations (#7887 (opens new window)) (a2fcad6 (opens new window))
- prevent reuse of broken connections in postgres pool (#7792 (opens new window)) (5cf368a (opens new window))
- prevent transactions in the Cordova driver (#7771 (opens new window)) (fc4133c (opens new window))
- properly escape oracle table paths (#7917 (opens new window)) (7e8687c (opens new window))
- regression when making
join
conditionsundefined
-able (#7892 (opens new window)) (b0c1cc6 (opens new window)) - restored
buildColumnAlias
for backward compatibility (#7706 (opens new window)) (36ceefa (opens new window)) - return correct DeleteResult and UpdateResult for mongo (#7884 (opens new window)) (7a646a2 (opens new window))
- support fully qualified schema in createSchema (#7934 (opens new window)) (94edd12 (opens new window))
- support table names between schemas in oracle (#7951 (opens new window)) (aa45b93 (opens new window))
- typing so SelectQueryBuilder.getRawOne may return undefined (#7863 (opens new window)) (36e5a0c (opens new window)), closes #7449 (opens new window)
- typo prevented us from pulling the schema correctly in some cases (c7f2db8 (opens new window))
- update operation in MongoDB impact all matched documents (#7803 (opens new window)) (052014c (opens new window)), closes #7788 (opens new window)
- use correct query for cross-database mssql identity check (#7911 (opens new window)) (7869fb1 (opens new window))
- use fully qualified and escaped table names for oracle (#7857 (opens new window)) (2b90725 (opens new window)), closes #7779 (opens new window)
- use ObjectLiteral in UpdateEvent rather than
Entity
(#7910 (opens new window)) (78fbc14 (opens new window)) - use only table name in constraint naming strategy (5dc777f (opens new window))
# Features
- add
retryWrites
to allowed mongoextra
options (#7869 (opens new window)) (dcdaaca (opens new window)) - add capacitor driver options for encryption & version (#7868 (opens new window)) (a2bd94b (opens new window))
- add connection option
entitySkipConstructor
(f43d561 (opens new window)) - add ObjectLiteral typing to andWhere / orWhere (#7786 (opens new window)) (525381d (opens new window))
- add parseTableName to Driver interface (#7956 (opens new window)) (cffbf43 (opens new window))
- add path, database, and schema to Table (#7913 (opens new window)) (444e38b (opens new window))
- add property for database and schema in views (#7953 (opens new window)) (4c5bbd9 (opens new window))
- add referenced database & schema to TableForeignKey (fff6b11 (opens new window))
- add writeConcern option as a possible
extras
for mongodb (#7801 (opens new window)) (90894c7 (opens new window)) - consistent parsing and escaping of table names in QueryRunners (bd9e767 (opens new window))
- implement OracleQueryRunner.hasDatabase (128b982 (opens new window))
- make parameter to getTables optional (#7901 (opens new window)) (ba86602 (opens new window))
- make postgres extensions install optional (#7725 (opens new window)) (92b96a5 (opens new window)), closes #7662 (opens new window)
- publicly export
Transaction*Event
types (#7949 (opens new window)) (2436a66 (opens new window)), closes /github.com/typeorm/typeorm/blob/master/src/subscriber/EntitySubscriberInterface.ts#L12 (opens new window) - set
enableArithAbort
for SQLServerDriver (#7894 (opens new window)) (1f64da2 (opens new window)) - support absolute path in migration:generate (#7720 (opens new window)) (b690c27 (opens new window))
- use char(36) for uuid representation in mysql (#7853 (opens new window)) (063aafa (opens new window))
- use column length from driver when creating columns (#7858 (opens new window)) (b107ad9 (opens new window))
# 0.2.34 (opens new window) (2021-06-03)
# Bug Fixes
- restored
buildColumnAlias
for backward compatibility (#7706 (opens new window)) (36ceefa (opens new window))
# 0.2.33 (opens new window) (2021-06-01)
# Bug Fixes
- @Unique constraint is not created with specified name (beea2e1 (opens new window))
MATERIALIZED VIEW
is treated as a regularVIEW
which causes issues on sync (#7592 (opens new window)) (f85f436 (opens new window))- added error handler for slave connections in MySQL and AuroraDataApi drivers (#7641 (opens new window)) (882a740 (opens new window))
- call listeners for array embeddeds in MongoDB (#4260 (opens new window)) (2dc355b (opens new window))
- closing pool incorrectly works on Postgres (#7596 (opens new window)) (1310c97 (opens new window)), closes #6958 (opens new window) #6958 (opens new window) #6958 (opens new window)
- column name with empty spaces causes bug in Index/Unique decorators #7534 (opens new window) (a3a6e06 (opens new window))
- correctly strip type conversion in postgres for default values (#7681 (opens new window)) (069b8b6 (opens new window)), closes #1532 (opens new window) #7647 (opens new window) #5132 (opens new window)
- datetime functions in column "default" leads to unnecessary queries during synchronization (#7517 (opens new window)) (03f3285 (opens new window)), closes #3991 (opens new window) #3991 (opens new window) #2737 (opens new window) #2737 (opens new window) #6412 (opens new window) #4281 (opens new window) #4658 (opens new window) #3991 (opens new window) #2333 (opens new window) #7381 (opens new window) #4658 (opens new window) #3991 (opens new window) #3991 (opens new window) #3991 (opens new window) #3991 (opens new window)
- default
schema
defined in entity/connection leads to unnecessary queries during schema sync (#7575 (opens new window)) (7eb0327 (opens new window)), closes #7276 (opens new window) #7276 (opens new window) - do a deep comparison to see if the default value has changed for
json
types in Postgres (#7650 (opens new window)) (a471c1b (opens new window)) - Incorrect migration generated when multiple views are updated in a single migration (#7587 (opens new window)) (0b103dd (opens new window)), closes #7586 (opens new window)
- issues with custom enum name in Postgres (#7661 (opens new window)) (ad0262a (opens new window)), closes #7614 (opens new window) #7541 (opens new window) #7647 (opens new window) #6540 (opens new window)
- mongodb connectionURL parse options (#7560 (opens new window)) (b2ac41a (opens new window))
- mongodb typings for Cursor (#7526 (opens new window)) (daf3991 (opens new window))
- only first \0 is removed in comments, only first \ is escaped etc. (#7532 (opens new window)) (36b14cb (opens new window))
- pass
ManyToMany
onUpdate
option to foreign key metadata (#5714 (opens new window)) (198d2c5 (opens new window)), closes #4980 (opens new window) - Postgres identifier exceeds limit on eager relations (#7508 (opens new window)) (#7509 (opens new window)) (e4ec429 (opens new window))
- remove
enableExtension
for slave connections in Postgres (#7693 (opens new window)) (620aac9 (opens new window)), closes #7691 (opens new window) - replaced deprecated
insert
method withinsertOne
for MongoDriver in MigrationExecutor. (#7594 (opens new window)) (83fed60 (opens new window)) - resolve issue when enum that has functions is used in entity (#7653 (opens new window)) (dba327d (opens new window)), closes #7651 (opens new window)
- Silent failure in createDatabase and dropDatabase with Postgres (#7590 (opens new window)) (974d2d4 (opens new window)), closes #6867 (opens new window)
- STI types on children in joins (#3160 (opens new window)) (60a6c5d (opens new window))
- use
host
ifhostReplicaSet
is not provided in MongoDriver (#7559 (opens new window)) (9b6d7bc (opens new window)) - use migrationsTransactionMode while running migration from cli (#7576 (opens new window)) (7953ebb (opens new window))
- use most specific matching relation type (#2967 (opens new window)) (ee3c00a (opens new window))
# Features
- add
orphanedRowAction
option to EntitySchemaRelationOptions (#7625 (opens new window)) (a8eb49a (opens new window)), closes #7417 (opens new window) - add
set
datatype support for aurora-data-api (#7665 (opens new window)) (b6c1836 (opens new window)) - add support for specifying
ioredis
cache with a URL (#7689 (opens new window)) (e017f9b (opens new window)), closes #7631 (opens new window) - add tree entities update and delete logic (#7156 (opens new window)) (9c8a3fb (opens new window)), closes #7155 (opens new window)
- added Capacitor driver (#7695 (opens new window)) (0f7a778 (opens new window))
- cache option to ignore errors (#7630 (opens new window)) (5fde0ea (opens new window)), closes #926 (opens new window)
- define class properties for QueryFailedError to allow users to access a typed error (#7529 (opens new window)) (b43dcba (opens new window))
- support
MAX_EXECUTION_TIME
for MySQL driver. (#7638 (opens new window)) (0564c34 (opens new window))
# 0.2.32 (opens new window) (2021-03-30)
# Bug Fixes
- aurora-data-api get correct increment primary key for multiple entities inserted (#7434 (opens new window)) (fc8af5f (opens new window)), closes #7385 (opens new window)
- aurora-data-api return number of affected rows in UpdatedResult and DeleteResult (#7433 (opens new window)) (46aba1d (opens new window)), closes #7386 (opens new window)
- RelationLoader load with existing queryRunner (#7471 (opens new window)) (2dcb493 (opens new window)), closes #5338 (opens new window)
- Array type default value should not generate SQL commands without change (#7409 (opens new window)) (7f06e44 (opens new window))
- correctly get referenceColumn value in
getEntityValueMap
(#7005 (opens new window)) (7fe723b (opens new window)), closes #7002 (opens new window) - don't transform json(b) column value when computing update changes (#6929 (opens new window)) (6be54d4 (opens new window))
- empty entity when query with nested relations (#7450 (opens new window)) (9abf727 (opens new window)), closes #7041 (opens new window) #7041 (opens new window) #7041 (opens new window)
- fixed all known enum issues (#7419 (opens new window)) (724d80b (opens new window)), closes #5371 (opens new window) #6471 (opens new window) #7217 (opens new window) #6047 (opens new window) #7283 (opens new window) #5871 (opens new window) #5729 (opens new window) #5478 (opens new window) #5882 (opens new window) #5275 (opens new window) #2233 (opens new window) #5648 (opens new window) #4897 (opens new window) #6376 (opens new window) #6115 (opens new window)
- improve EntityManager.save() return type (#7391 (opens new window)) (66fbfda (opens new window))
- Only first single quote in comments is escaped (#7514 (opens new window)) (e1e9423 (opens new window))
- performance issues of
RelationId
. (#7318 (opens new window)) (01a215a (opens new window)), closes #5691 (opens new window) - rename a sequence related to generated primary key when a table is renamed (#5406 (opens new window)) (25b457f (opens new window))
- resolve issue building tree entities with embeded primary column (#7416 (opens new window)) (dc81814 (opens new window)), closes #7415 (opens new window)
- wrong migration generation when column default value is set to null #6950 (opens new window) (#7356 (opens new window)) (5a3f9ff (opens new window))
# Features
- add check and dry-run to migration generate (#7275 (opens new window)) (d6df200 (opens new window)), closes #3037 (opens new window) #6978 (opens new window)
- add option for installing package using CLI (#6889 (opens new window)) (3d876c6 (opens new window))
- Add support for Access Token Authentication for SQL Server Driver (mssql) (#7477 (opens new window)) (e639772 (opens new window))
- added socketPath support for replicas in MySQL driver (#7459 (opens new window)) (8d7afaf (opens new window))
- allow to pass the given table name as string in RelationDecorators (#7448 (opens new window)) (4dbb10e (opens new window))
- implement "FOR UPDATE OF" for postgres driver (#7040 (opens new window)) (fde9f07 (opens new window))
- introduced a new configuration option "formatOptions.castParameters" to delegate the prepare/hydrate parameters to the driver which will result in casting the parameters to their respective column type (#7483 (opens new window)) (7793b3f (opens new window))
- output Javascript Migrations instead of TypeScript (#7294 (opens new window)) (b97cc4f (opens new window))
# 0.2.31 (opens new window) (2021-02-08)
# Bug Fixes
- append condition to STI child entity join (#7339 (opens new window)) (68bb82e (opens new window))
- avoid regex lookbehind for compatibility (#7270 (opens new window)) (063d27f (opens new window)), closes #7026 (opens new window)
- cache from ENV - add ioredis support (#7332 (opens new window)) (5e2117c (opens new window))
- datetime2 rounding in mssql (#7264 (opens new window)) (4711a71 (opens new window)), closes #3202 (opens new window)
- escape columns in InsertQueryBuilder.orUpdate (#6316 (opens new window)) (ab56e07 (opens new window))
- incorrect postgres uuid type in PrimaryGeneratedColumnType (#7298 (opens new window)) (2758502 (opens new window))
- MariaDB VIRTUAL + [NOT NULL|NULL] error (#7022 (opens new window)) (82f2b75 (opens new window)), closes #2691 (opens new window)
- reject nullable primary key columns (#7001 (opens new window)) (cdace6e (opens new window))
- resolve issue with find with relations returns soft-deleted entities (#7296 (opens new window)) (d7cb338 (opens new window)), closes #6265 (opens new window)
- save does not return id, save does not return generated (#7336 (opens new window)) (01a6aee (opens new window))
# Features
- enable explicitly inserting IDENTITY values into mssql (#6199 (opens new window)) (4abbd46 (opens new window)), closes #2199 (opens new window)
- export all errors (#7006 (opens new window)) (56300d8 (opens new window))
- option to disable foreign keys creation (#7277 (opens new window)) (cb17b95 (opens new window)), closes #3120 (opens new window) #3120 (opens new window)
- support maxdecimaldigits option by geometry type (#7166 (opens new window)) (d749008 (opens new window))
- useUTC connection option for oracle and postgres (#7295 (opens new window)) (e06a442 (opens new window))
# BREAKING CHANGES
- passing
ColumnOptions
to@PrimaryColumn
does not function anymore. One must usePrimaryColumnOptions
instead. - minor breaking change on "conflict*" options - column names used are now automatically escaped.
# 0.2.30 (opens new window) (2021-01-12)
# Bug Fixes
- add missing "comment" field to QB clone method (#7205 (opens new window)) (f019771 (opens new window)), closes #7203 (opens new window)
- avoid early release of PostgresQueryRunner (#7109 (opens new window)) (#7185 (opens new window)) (9abe007 (opens new window))
- Error when sorting by an embedded entity while using join and skip/take (#7082 (opens new window)) (d27dd2a (opens new window)), closes #7079 (opens new window)
- Fix CLI query command TypeError (#7043 (opens new window)) (b35397e (opens new window))
- get length attribute of postgres array columns (#7239 (opens new window)) (eb82f78 (opens new window)), closes #6990 (opens new window)
- handle overlapping property / database names in querybuilder (#7042 (opens new window)) (b518fa1 (opens new window)), closes #7030 (opens new window)
- improve stack traces when using persist executor (#7218 (opens new window)) (0dfe5b8 (opens new window))
- order should allow only model fields, not methods (#7188 (opens new window)) (0194193 (opens new window)), closes #7178 (opens new window)
- resolve migration for UpdateDateColumn without ON UPDATE clause (#7057 (opens new window)) (ddd8cbc (opens new window)), closes #6995 (opens new window)
- resolves Postgres sequence identifier length error (#7115 (opens new window)) (568ef35 (opens new window)), closes #7106 (opens new window)
- return 'null' (instead of 'undefined') on lazy relations that have no results (#7146 (opens new window)) (#7147 (opens new window)) (9b278c9 (opens new window))
- support MongoDB DNS seed list connection (#7136 (opens new window)) (f730bb9 (opens new window)), closes #3347 (opens new window) #3133 (opens new window)
- data-api: Fixed how data api driver uses and reuses a client (#6869 (opens new window)) (6ce65fb (opens new window))
- use default import of yargs for --help (#6986 (opens new window)) (6ef8ffe (opens new window))
# Features
- add NOWAIT and SKIP LOCKED lock support for MySQL (#7236 (opens new window)) (9407507 (opens new window)), closes #6530 (opens new window)
- closure table custom naming (#7120 (opens new window)) (bcd998b (opens new window))
- JavaScript file migrations output (#7253 (opens new window)) (ce9cb87 (opens new window))
- relations: Orphaned row action (#7105 (opens new window)) (efc2837 (opens new window))
# 0.2.29 (opens new window) (2020-11-02)
# Bug Fixes
- allow falsey discriminator values (#6973 (opens new window)) (f3ba242 (opens new window)), closes #3891 (opens new window)
- allow for complex jsonb primary key columns (#6834 (opens new window)) (f95e9d8 (opens new window)), closes #6833 (opens new window)
- Allows valid non-object JSON to be retrieved in simple-json columns (#6574 (opens new window)) (0aedf43 (opens new window)), closes #5501 (opens new window)
- Cannot read property 'hasMetadata' of undefined (#5659 (opens new window)) (0280cdc (opens new window)), closes #3685 (opens new window)
- check if the connection is closed before executing a query. This prevents SQLITE_MISUSE errors (https://sqlite.org/rescode.html#misuse) originating from sqlite itself (#6975 (opens new window)) (5f6bbec (opens new window))
- check mysql constraint schema on join (#6851 (opens new window)) (d2b914d (opens new window)), closes #6169 (opens new window) #6169 (opens new window)
- correct reading of custom ormconfig.env files (#6922 (opens new window)) (a09fb7f (opens new window))
- explicitly define
query
command's param (#6899 (opens new window)) (4475d80 (opens new window)), closes #6896 (opens new window) - findRoots should get the defined primary key column (#6982 (opens new window)) (f2ba901 (opens new window)), closes #6948 (opens new window) #6948 (opens new window)
- Fix Mongodb delete by ObjectId. Closes #6552 (opens new window) (#6553 (opens new window)) (e37eb1e (opens new window))
- fixes the typescript errors in EntityCreateCommand & SubscriberCreateCommand (#6824 (opens new window)) (0221a93 (opens new window))
- handle count multiple PK & edge cases more gracefully (#6870 (opens new window)) (4abfb34 (opens new window)), closes #5989 (opens new window) #5314 (opens new window) #4550 (opens new window)
- Handle undefined querysets in QueryCommand (#6910 (opens new window)) (6f285dc (opens new window)), closes #6612 (opens new window)
- handle Undefined values in driver URL options (#6925 (opens new window)) (6fa2df5 (opens new window))
- ILike operator generally available for any driver (#6945 (opens new window)) (37f0d8f (opens new window))
- Only check for discriminator conflicts on STI entities (#2985 (opens new window)) (06903d1 (opens new window)), closes #2984 (opens new window)
- postgresql connection URL can use an UNIX Socket (#2614 (opens new window)) (#6042 (opens new window)) (21c4166 (opens new window))
- prevent create-type commands edge-case TypeErrors (#6836 (opens new window)) (08ec0a8 (opens new window)), closes #6831 (opens new window)
- redundant migration with decimal default (#6879 (opens new window)) (6ff67f7 (opens new window)), closes #6140 (opens new window) #5407 (opens new window)
- remove @DiscriminatorValue from error message (#5256 (opens new window)) (2bf15ca (opens new window)), closes #5255 (opens new window)
- resolves issue proto-less object validation (#6884 (opens new window)) (e08d9c6 (opens new window)), closes #2065 (opens new window)
- return null for nullable RelationId() column (#6848 (opens new window)) (7147a0d (opens new window)), closes #6815 (opens new window)
- subscribers should use the subscribersDir (5ef9450 (opens new window))
- support changing comments in MySQL columns (#6903 (opens new window)) (c5143aa (opens new window))
- support combination of many-to-one/cacade/composte PK (#6417 (opens new window)) (9a0497b (opens new window))
- support empty
IN
clause across all dialects (#6887 (opens new window)) (9635080 (opens new window)), closes #4865 (opens new window) #2195 (opens new window) - support multiple row insert on oracle (#6927 (opens new window)) (a5eb946 (opens new window)), closes #2434 (opens new window)
- sync the typeorm-model-shim (#6891 (opens new window)) (c72e48b (opens new window)), closes #6288 (opens new window) #5920 (opens new window)
- TreeRepository based entities primary column supports custom name. (#6942 (opens new window)) (7ec1b75 (opens new window))
- use
require
inReactNativeDriver
(#6814 (opens new window)) (1a6383c (opens new window)), closes #6811 (opens new window) - use correct type for MongoQueryRunner.databaseConnection (#6906 (opens new window)) (da70b40 (opens new window)), closes #6453 (opens new window)
- use pg ^8 in
init
command (6ed9906 (opens new window)) - wrong FK loaded in multi-database environment (#6828 (opens new window)) (c060f95 (opens new window)), closes #6168 (opens new window)
# Features
- add ability for escaping for Raw() find operator (#6850 (opens new window)) (91b85bf (opens new window))
- add absolute path support to other CLI commands (#6807 (opens new window)) (d9a76e9 (opens new window))
- Add SelectQueryBuilder.getOneOrFail() (#6885 (opens new window)) (920e781 (opens new window)), closes #6246 (opens new window)
- backport ilike from next (#6862 (opens new window)) (c8bf81e (opens new window))
- Exit with code 1 on empty migration:generate (#6978 (opens new window)) (8244ea1 (opens new window))
- schema synchronization for partitioned tables with PostgreSQL 12+ (#6780 (opens new window)) (990442e (opens new window))
- support
autoEncryption
option for MongoDB (#6865 (opens new window)) (b22c27f (opens new window)) - Support column comments in Postgres and CockroachDB (#6902 (opens new window)) (bc623a4 (opens new window)), closes #3360 (opens new window)
- support ESM in ormconfig js & ts (#6853 (opens new window)) (7ebca2b (opens new window)), closes #5003 (opens new window)
- support query comments in the query builder (#6892 (opens new window)) (84c18a9 (opens new window)), closes #3643 (opens new window)
- transactional events in subscriber interface + "transaction" option in FindOptions (#6996 (opens new window)) (0e4b239 (opens new window))
# Performance Improvements
- Improve MySQL LoadTables Performance (#6886 (opens new window)) (0f0e0b6 (opens new window)), closes #6800 (opens new window)
- Improve replacePropertyNames (#4760 (opens new window)) (d86671c (opens new window))
# 0.2.28 (opens new window) (2020-09-30)
# Bug Fixes
- FindManyOptions order in parameter typing is important (51608ae (opens new window))
- lock Typescript to 3.6.0 (#6810 (opens new window)) (7f7e4d5 (opens new window)), closes #6809 (opens new window) #6805 (opens new window)
# 0.2.27 (opens new window) (2020-09-29)
# Bug Fixes
- add dummy for FileLogger, ConnectionOptionsReaders, and update gulpfile (#6763 (opens new window)) (180fbd4 (opens new window))
- backport FindOperator return types (#6717 (opens new window)) (2b37808 (opens new window))
- coerce port to number in ConnectionOptionsEnvReader (#6786 (opens new window)) (55fbb69 (opens new window)), closes #6781 (opens new window)
- count() method for multiple primary keys for cockroachdb (#6745 (opens new window)) (dfe8259 (opens new window))
- enforce name argument of migration generate command (#2719 (opens new window)) (#6690 (opens new window)) (dfcb2db (opens new window)), closes #4798 (opens new window) #4805 (opens new window) #4798 (opens new window) #4805 (opens new window)
- ensure browser builds don't include any non-browser modules (#6743 (opens new window)) (c714867 (opens new window)), closes #6739 (opens new window)
- hdb-pool is not namespaced under @sap (opens new window) (#6700 (opens new window)) (9583430 (opens new window)), closes #6697 (opens new window)
- migration:generate issue with onUpdate using mariadb 10.4 (#6714 (opens new window)) (6e28322 (opens new window))
- prevent multiple
release
listeners in PostgresQueryRunner (#6708 (opens new window)) (208cf6b (opens new window)), closes #6699 (opens new window) - prevent wrong returned entity in ReturningResultsEntityUpdator (#6440 (opens new window)) (c1c8e88 (opens new window))
- resolve issues ora-00972:identifier is too long (#6751 (opens new window)) (b55a417 (opens new window)), closes #5067 (opens new window) #5067 (opens new window)
- sql.js v1.2+ don't support undefined parameters (#6698 (opens new window)) (ea59b8d (opens new window)), closes #5720 (opens new window)
# Features
- add option to pass postgres server notices to client logger (#6215 (opens new window)) (5084e47 (opens new window)), closes #2216 (opens new window)
- backport SQLite Busy handler & WAL mode enable (#6588 (opens new window)) (7a52f18 (opens new window))
- Beautify generated SQL for migrations (#6685 (opens new window)) (370442c (opens new window)), closes #4415 (opens new window)
- create EntityTarget and use instead of EntitySchema / ObjectType / etc (#6701 (opens new window)) (8b68f40 (opens new window))
# Reverts
- Revert "fix: properly override database url properties (#6247)" (#6802) (45b980c (opens new window)), closes #6247 (opens new window) #6802 (opens new window)
# 0.2.26 (opens new window) (2020-09-10)
# Bug Fixes
- @JoinTable does not respect inverseJoinColumns referenced column width (#6444 (opens new window)) (f642a9e (opens new window)), closes #6442 (opens new window)
- add missing schema for OracleDriver (#6673 (opens new window)) (8b8bc35 (opens new window))
- change InsertQueryBuilder.values() with an empty array into a no-op (#6584 (opens new window)) (9d2df28 (opens new window)), closes #3111 (opens new window)
- Child entities not being saved correctly with cascade actions (#6219 (opens new window)) (16a2d80 (opens new window))
- correctly parse connection URI with query params (#6390 (opens new window)) (54a3a15 (opens new window)), closes #6389 (opens new window)
- decorators should implement the official TypeScript interface (#6398 (opens new window)) (c23c888 (opens new window)), closes #5922 (opens new window)
- DeepPartial with any and {[k: string]: any} (#6581 (opens new window)) (8d90d40 (opens new window)), closes #6580 (opens new window) #6580 (opens new window)
- exporting missing load event (#6396 (opens new window)) (c6336aa (opens new window))
- get correct insert ids for multiple entities inserted (#6668 (opens new window)) (ef2011d (opens new window)), closes #2131 (opens new window) #5973 (opens new window) #2131 (opens new window)
- getPendingMigrations isn't properly working (#6372 (opens new window)) (7c0da1c (opens new window))
- handle 'error' events from pool connection (#6262 (opens new window)) (ae3cf0e (opens new window))
- insert IN(null) instead of IN() when In([]) empty array for mysqlDriver (#6237 (opens new window)) (6f6bdbd (opens new window))
- make only a single SELECT to get inserted default and generated values of multiple entities (#6669 (opens new window)) (4fc4a1b (opens new window)), closes #6266 (opens new window) #6266 (opens new window)
- Migration issues with scale & precision in sqlite/sql.js (#6638 (opens new window)) (0397e44 (opens new window)), closes #6636 (opens new window)
- mysql migration: make sure the indices sql which left-join be the same database (#6426 (opens new window)) (906d97f (opens new window))
- pass
ids_
to alias builder to prevent length overflow (#6624 (opens new window)) (cf3ad62 (opens new window)) - pass formatOptions to Data API Client, fix extensions (#6404 (opens new window)) (9abab82 (opens new window)), closes #1 (opens new window)
- Query builder makes query with joins, without limit for inherited entities (#6402 (opens new window)) (874e573 (opens new window)), closes #6399 (opens new window)
- remove unnecessary optionality from Raw operator's columnAlias argument (#6321 (opens new window)) (0d99b46 (opens new window))
- resolve missing decorators on shim (#6354 (opens new window)) (8e2d97d (opens new window)), closes #6093 (opens new window)
- revert fix handle URL objects as column field values (#6145 (opens new window)) (e073e02 (opens new window))
- SqlQueryRunner.hasColumn was not working (#6146 (opens new window)) (a595fed (opens new window)), closes #5718 (opens new window)
- support multiple
JoinColumn
s in EntitySchema (#6397 (opens new window)) (298a3b9 (opens new window)), closes #5444 (opens new window) - Unnecessary migrations for fulltext indices (#6634 (opens new window)) (c81b405 (opens new window)), closes #6633 (opens new window)
- unnecessary migrations for unsigned numeric types (#6632 (opens new window)) (7ddaf23 (opens new window)), closes #2943 (opens new window) /github.com/typeorm/typeorm/pull/6632#pullrequestreview-480932808 (opens new window)
- update query deep partial TypeScript definition (#6085 (opens new window)) (23110d1 (opens new window))
# Features
- add AWS configurationOptions to aurora-postgres connector (#6106 (opens new window)) (203f51d (opens new window))
- add better-sqlite3 driver (#6224 (opens new window)) (2241451 (opens new window))
- add postgres connection timeout option (#6160 (opens new window)) (0072149 (opens new window))
- FileLogger accepts custom file path (#6642 (opens new window)) (c99ba40 (opens new window)), closes #4410 (opens new window)
- implement postgres ltree (#6480 (opens new window)) (43a7386 (opens new window)), closes #4193 (opens new window)
- support absolute paths in migrationsDir for the CLI (#6660 (opens new window)) (2b5f139 (opens new window))
- support cjs extension for ormconfig (#6285 (opens new window)) (6eeb03a (opens new window))
# 0.2.25 (opens new window) (2020-05-19)
# Bug Fixes
- 'in' clause case for ORACLE (#5345 (opens new window)) (8977365 (opens new window))
- calling EntityManager.insert() with an empty array of entities (#5745 (opens new window)) (f8c52f3 (opens new window)), closes #5734 (opens new window) #5734 (opens new window) #5734 (opens new window)
- columns with transformer should be normalized for update (#5700 (opens new window)) (4ef6b65 (opens new window)), closes #2703 (opens new window)
- escape column comment in mysql driver (#6056 (opens new window)) (5fc802d (opens new window))
- expo sqlite driver disconnect() (#6027 (opens new window)) (61d59ca (opens new window))
- HANA - SSL options, column delta detection mechanism (#5938 (opens new window)) (2fd0a8a (opens new window))
- handle URL objects as column field values (#5771 (opens new window)) (50a0641 (opens new window)), closes #5762 (opens new window) #5762 (opens new window)
- insert and update query builder to handle mssql geometry column correctly (#5947 (opens new window)) (87cc6f4 (opens new window))
- migrations being generated for FK even if there are no changes (#5869 (opens new window)) (416e419 (opens new window))
- multiple assignments to same column on UPDATE #2651 (opens new window) (#5598 (opens new window)) (334e17e (opens new window))
- prevent TypeError when calling bind function with sql.js 1.2.X (#5789 (opens new window)) (c6cbddc (opens new window))
- prototype pollution issue (#6096 (opens new window)) (db9d0fa (opens new window))
- provide a default empty array for parameters. (#5677 (opens new window)) (9e8a8cf (opens new window))
- redundant undefined parameters are not generated in migration files anymore (#5690 (opens new window)) (d5cde49 (opens new window))
- replacing instanceof Array checks to Array.isArray because instanceof Array seems to be problematic on some platforms (#5606 (opens new window)) (b99b4ad (opens new window))
- respect database from connection urls (#5640 (opens new window)) (ed75d59 (opens new window)), closes #2096 (opens new window)
- sha.js import (#5728 (opens new window)) (8c3f48a (opens new window))
- Unknown fields are stripped from WHERE clause (issue #3416 (opens new window)) (#5603 (opens new window)) (215f106 (opens new window))
- update dependency mkdirp to 1.x (#5748 (opens new window)) (edeb561 (opens new window))
- update Entity decorator return type to ClassDecorator (#5776 (opens new window)) (7d8a1ca (opens new window))
- use an empty string enum as the type of a primary key column (#6063 (opens new window)) (8e0d817 (opens new window)), closes #3874 (opens new window)
- use correct typings for the result of
getUpsertedIds()
(#5878 (opens new window)) (2ab88c2 (opens new window)) - wrong table name parameter when not using default schema (#5801 (opens new window)) (327144a (opens new window))
# Features
- add FOR NO KEY UPDATE lock mode for postgresql (#5971 (opens new window)) (360122f (opens new window))
- add name option to view column (#5962 (opens new window)) (3cfcc50 (opens new window)), closes #5708 (opens new window)
- Add soft remove and recover methods to entity (#5854 (opens new window)) (9d2b8e0 (opens new window))
- added support for NOWAIT & SKIP LOCKED in Postgres (#5927 (opens new window)) (2c90e1c (opens new window))
- Aurora Data API - Postgres Support (#5651 (opens new window)) (e584297 (opens new window))
- aurora Data API - Support for AWS configuration options through aurora driver (#5754 (opens new window)) (1829f96 (opens new window))
- create-column, update-column, version-column column kinds now support user specified values (#5867 (opens new window)) (5a2eb30 (opens new window)), closes #3271 (opens new window)
- names of extra columns for specific tree types moved to NamingStrategy (#5737 (opens new window)) (ec3be41 (opens new window))
- PG allow providing a function for password (#5673 (opens new window)) (265d1ae (opens new window))
- update cli migration up and down from any to void (#5630 (opens new window)) (76e165d (opens new window))
- UpdateResult returns affected rows in mysql (#5628 (opens new window)) (17f2fff (opens new window)), closes #1308 (opens new window)
# Performance Improvements
- An optimized version of EntityMetadata#compareIds() for the common case (#5419 (opens new window)) (a9bdb37 (opens new window))
# 0.2.23 (opens new window), 0.2.24 (opens new window) (2020-02-28)
# Bug Fixes
- .synchronize() drops json column on mariadb (#5391 (opens new window)) (e3c78c1 (opens new window)), closes typeorm/typeorm#3636 (opens new window)
- (base-entity) set create return type to T[] (#5400 (opens new window)) (ceff897 (opens new window))
- add the enableArithAbort option to the sql server connection option typings (#5526 (opens new window)) (d19dbc6 (opens new window))
- bug when default value in mssql were not updated if previous default was already set (9fc8329 (opens new window))
- change OrmUtils.mergeDeep to not merge RegExp objects (#5182 (opens new window)) (0f51836 (opens new window)), closes #3534 (opens new window)
- fk on update should not use attributes of on delete (2baa934 (opens new window))
- load typeorm-aurora-data-api-driver correctly when using webpack (#4788 (opens new window)) (#5302 (opens new window)) (9da0d34 (opens new window))
- not to make typeorm generate alter query on geometry column when that column was not changed (#5525 (opens new window)) (ee57557 (opens new window))
- Oracle sql expression for date column (#5305 (opens new window)) (40e9d3a (opens new window)), closes #4452 (opens new window) #4452 (opens new window)
- refactoring instance of with Array.isArray() (#5539 (opens new window)) (1e1595e (opens new window))
- Return NULL when normalize default null value (#5517 (opens new window)) (1826b75 (opens new window)), closes #5509 (opens new window)
- SAP HANA driver fixes (#5445 (opens new window)) (87b161f (opens new window))
- update foreign keys when table name changes (#5482 (opens new window)) (7157cb3 (opens new window))
- use OUTPUT INTO on SqlServer for returning columns (#5361 (opens new window)) (6bac3ca (opens new window)), closes #5160 (opens new window) #5160 (opens new window)
- use sha.js instead of crypto for hash calculation (#5270 (opens new window)) (b380a7f (opens new window))
# Features
- Add basic support for custom cache providers (#5309 (opens new window)) (6c6bde7 (opens new window))
- add fulltext parser option (#5380 (opens new window)) (dd73395 (opens new window))
# 0.2.22 (opens new window) (2019-12-23)
# Bug Fixes
- use a prefix on SelectQueryBuilder internal parameters (#5178 (opens new window)) (cacb08b (opens new window)), closes #5174 (opens new window) #5174 (opens new window)
# Features
- hash aliases to avoid conflicts (#5227 (opens new window)) (edc8e6d (opens new window))
- implement driver options for NativeScript (#5217 (opens new window)) (3e58426 (opens new window))
- SAP Hana support (#5246 (opens new window)) (ec90341 (opens new window))
- speed up id search in buildChildrenEntityTree (#5202 (opens new window)) (2e628c3 (opens new window))
# BREAKING CHANGES
- aliases for very long relation names may be replaced with hashed strings. Fix: avoid collisions by using longest possible hash. Retain more entropy by not using only 8 characters of hashed aliases.
# 0.2.21 (opens new window) (2019-12-05)
# Bug Fixes
- allow expireAfterSeconds 0 in Index decorator (close #5004 (opens new window)) (#5005 (opens new window)) (d05467c (opens new window))
- do not mutate connection options (#5078 (opens new window)) (1047989 (opens new window))
- mysql driver query streaming (#5036 (opens new window)) (aff2f56 (opens new window))
- remove consrc usage (postgres,cockroachdb) (#4333 (opens new window)) (ce7cb16 (opens new window)), closes #4332 (opens new window)
- repo for app-root-path in lock file (#5052 (opens new window)) (f0fd192 (opens new window))
- resolve MySQL unique index check when bigNumberStrings is false (#4822 (opens new window)) (d205574 (opens new window)), closes #2737 (opens new window)
- resolve sorting bug for several mongo vesions with typeorm migration (#5121 (opens new window)) (cb771a1 (opens new window)), closes #5115 (opens new window)
- throwing error on duplicate migration names #4701 (opens new window) (#4704 (opens new window)) (3e4dc9f (opens new window))
- unescaped column name in order clause of "migrations" (#5108 (opens new window)) (c0c8566 (opens new window))
- upgrade app-root-path (#5023 (opens new window)) (7f87f0c (opens new window))
# Features
- add distinct on() support for postgres (#4954 (opens new window)) (1293065 (opens new window))
- add migrations transaction option to connection options (#5147 (opens new window)) (fb60688 (opens new window)), closes #4629 (opens new window) #4629 (opens new window)
- asynchronous ormconfig support (#5048 (opens new window)) (f9fdaee (opens new window)), closes #4149 (opens new window)
- export Migration Execution API from main package (fixes #4880 (opens new window)) (#4892 (opens new window)) (8f4f908 (opens new window))
- support spatial types of MySQL 8+ (#4794 (opens new window)) (231dadf (opens new window)), closes #3702 (opens new window)
# 0.2.20 (opens new window) (2019-10-18)
# Bug Fixes
- ensure distinct property is respected cloning query builder (#4843 (opens new window)) (ea17094 (opens new window)), closes #4842 (opens new window)
- aurora: apply mysql query fixes to aurora (#4779 (opens new window)) (ee61c51 (opens new window))
- allow EntitySchema to be passed to EntityRepository (#4884 (opens new window)) (652a20e (opens new window))
- better timestamp comparison (#4769 (opens new window)) (0a13e6a (opens new window))
- broken database option when using replication, changes introduced by #4753 (opens new window) (#4826 (opens new window)) (df5479b (opens new window))
- check for version of MariaDB before extracting COLUMN_DEFAULT (#4783 (opens new window)) (c30b485 (opens new window))
- connection Reuse is broken in a Lambda environment: (#4804 (opens new window)) (7962036 (opens new window))
- FindOptionUtils export (#4746 (opens new window)) (4a62b1c (opens new window)), closes #4745 (opens new window)
- loading of aurora-data-api driver (#4765 (opens new window)) (fbb8947 (opens new window))
- postgres: postgres query runner to create materialized view (#4877 (opens new window)) (d744966 (opens new window))
- migrations run in reverse order for mongodb (#4702 (opens new window)) (2f27581 (opens new window))
- mongodb Cursor.forEach types (#4759 (opens new window)) (fccbe3e (opens new window))
- Slack invite URL (#4836 (opens new window)) (149af26 (opens new window))
# Features
- add name to MigrationInterface (fixes #3933 (opens new window) and fixes #2549 (opens new window)) (#4873 (opens new window)) (4a73fde (opens new window))
- add new transaction mode to wrap each migration in transaction (#4629 (opens new window)) (848fb1f (opens new window))
- add option to Column to specify the complete enumName (#4824 (opens new window)) (d967180 (opens new window))
- add support for cube array for PostgreSQL (#4848 (opens new window)) (154a441 (opens new window))
- implements Sqlite 'WITHOUT ROWID' table modifier (#4688 (opens new window)) (c1342ad (opens new window)), closes #3330 (opens new window)
# 0.2.19 (opens new window) (2019-09-13)
# Bug Fixes
- "database" option error in driver when use "url" option for connection (690e6f5 (opens new window))
- "hstore injection" & properly handle NULL, empty string, backslashes & quotes in hstore key/value pairs (#4720 (opens new window)) (3abe5b9 (opens new window))
- add SaveOptions and RemoveOptions into ActiveRecord (#4318 (opens new window)) (a6d7ba2 (opens new window))
- apostrophe in Postgres enum strings breaks query (#4631 (opens new window)) (445c740 (opens new window))
- change PrimaryColumn decorator to clone passed options (#4571 (opens new window)) (3cf470d (opens new window)), closes #4570 (opens new window)
- createQueryBuilder relation remove works only if using ID (#2632 (opens new window)) (#4734 (opens new window)) (1d73a90 (opens new window))
- resolve issue with conversion string to simple-json (#4476 (opens new window)) (d1594f5 (opens new window)), closes #4440 (opens new window)
- sqlite connections don't ignore the schema property (#4599 (opens new window)) (d8f1c81 (opens new window))
- the excessive stack depth comparing types
FindConditions<?>
andFindConditions<?>
problem (#4470 (opens new window)) (7a0beed (opens new window)) - views generating broken Migrations (#4726 (opens new window)) (c52b3d2 (opens new window)), closes #4123 (opens new window)
# Features
- add
set
datatype support for MySQL/MariaDB (#4538 (opens new window)) (19e2179 (opens new window)), closes #2779 (opens new window) - add materialized View support for Postgres (#4478 (opens new window)) (dacac83 (opens new window)), closes #4317 (opens new window) #3996 (opens new window)
- add mongodb
useUnifiedTopology
config parameter (#4684 (opens new window)) (92e4270 (opens new window)) - add multi-dimensional cube support for PostgreSQL (#4378 (opens new window)) (b6d6278 (opens new window))
- add options to input init config for sql.js (#4560 (opens new window)) (5c311ed (opens new window))
- add postgres pool error handler (#4474 (opens new window)) (a925be9 (opens new window))
- add referenced table metadata to NamingStrategy to resolve foreign key name (#4274 (opens new window)) (0094f61 (opens new window)), closes #3847 (opens new window) #1355 (opens new window)
- add support for ON CONFLICT for cockroach (#4518 (opens new window)) (db8074a (opens new window)), closes #4513 (opens new window)
- Added support for DISTINCT queries (#4109 (opens new window)) (39a8e34 (opens new window))
- Aurora Data API (#4375 (opens new window)) (c321562 (opens new window))
- export additional schema builder classes (#4325 (opens new window)) (e589fda (opens new window))
- log files loaded from glob patterns (#4346 (opens new window)) (e12479e (opens new window)), closes #4162 (opens new window)
- UpdateResult returns affected rows in postgresql (#4432 (opens new window)) (7808bba (opens new window)), closes #1308 (opens new window)
# 0.2.18
# Bug fixes
- fixed loadRelationCountAndMap when entities' primary keys are strings (#3946 (opens new window))
- fixed QueryExpressionMap not cloning all values correctly (#4156 (opens new window))
- fixed transform embeddeds with no columns but with nested embeddeds (mongodb) (#4131 (opens new window))
- fixed the getMany() result being droped randomly bug when using the buffer as primary key. (#4220 (opens new window))
# Features
- adds
typeorm migration:show
command (#4173 (opens new window)) - deprecate column
readonly
option in favor ofupdate
andinsert
options (#4035 (opens new window)) - support sql.js v1.0 (#4104 (opens new window))
- added support for
orUpdate
in SQLlite (#4097 (opens new window)) - added support for
dirty_read
(NOLOCK) in SQLServer (#4133 (opens new window)) - extend afterLoad() subscriber interface to take LoadEvent (issue #4185 (opens new window))
- relation decorators (e.g.
@OneToMany
) now also acceptstring
instead oftypeFunction
, which prevents circular dependency issues in the frontend/browser (issue #4190 (opens new window)) - added support for metadata reflection in typeorm-class-transformer-shim.js (issue #4219 (opens new window))
- added
sqlJsConfig
to input config when initializing sql.js (issue #4559 (opens new window))
# 0.2.17 (2019-05-01)
# Bug fixes
- fixed transform embeddeds with boolean values (mongodb) (#3900 (opens new window))
- fixed issue with schema inheritance in STI pattern (#3957 (opens new window))
- revert changes from #3814 (opens new window) (#3828 (opens new window))
- fix performance issue when inserting into raw tables with QueryBuilder (#3931 (opens new window))
- sqlite date hydration is susceptible to corruption (#3949 (opens new window))
- fixed mongodb uniques, support 3 ways to define uniques (#3986 (opens new window))
- fixed mongodb TTL index (#4044 (opens new window))
# Features
- added deferrable options for foreign keys (postgres) (#2191 (opens new window))
- added View entity implementation (#1024 (opens new window)). Read more at View entities (opens new window)
- added multiple value transformer support (#4007 (opens new window))
# 0.2.16 (2019-03-26)
# Bug fixes
- removed unused parameters from
insert
,update
,delete
methods (#3888 (opens new window)) - fixed: migration generator produces duplicated changes (#1960 (opens new window))
- fixed: unique constraint not created on embedded entity field (#3142 (opens new window))
- fixed: FK columns have wrong length when PrimaryGeneratedColumn('uuid') is used (#3604 (opens new window))
- fixed: column option unique sqlite error (#3803 (opens new window))
- fixed: 'uuid' in PrimaryGeneratedColumn causes Many-to-Many Relationship to Fail (#3151 (opens new window))
- fixed: sync enums on schema sync (#3694 (opens new window))
- fixed: changes in enum type is not reflected when generating migration (in definition file) (#3244 (opens new window))
- fixed: migration will keep create and drop indexes if index name is the same across tables (#3379 (opens new window))
# Features
- added
lock
option inFindOptions
# 0.2.15 (2019-03-14)
# Bug fixes
- fixed bug in
connection.dropDatabase
method (#1414 (opens new window)) - fixed "deep relations" not loaded/mapped due to the built-in max length of Postgres (#3118 (opens new window))
- updated all dependencies
- fixed types issue from #3725 (opens new window)
- removed sql-function-support (
() =>
syntax) in parameters to prevent security considerations - fix sync schema issue with postgres enum in case capital letters in entity name (#3536 (opens new window))
# Features
- added
uuidExtension
option to Postgres connection options, which allows TypeORM to use the newerpgcrypto
extension to generate UUIDs
# 0.2.14 (2019-02-25)
# Bug fixes
- fixed migration issue with postgres numeric enum type - change queries are not generated if enum is not modified (#3587 (opens new window))
- fixed mongodb entity listeners in optional embeddeds (#3450 (opens new window))
- fixes returning invalid delete result
- reverted lazy loading properties not enumerable feature to fix related bugs
# Features
- added CockroachDB support
- added browser entry point to
package.json
(3583 (opens new window)) - replaced backend-only drivers by dummy driver in browser builds
- added
useLocalForage
option to Sql.js connection options, which enables asynchronous load and save operations of the datatbase from the indexedDB (#3554 (opens new window)) - added simple-enum column type (#1414 (opens new window))
# 0.2.13 (2019-02-10)
# Bug Fixes
- fixed undefined object id field in case property name is
_id
(3517 (opens new window)) - allow to use mongodb index options in
Index
decorator (#3592 (opens new window)) - fixed entity embeddeds indices in mongodb (#3585 (opens new window))
- fixed json/jsonb column data types comparison (#3496 (opens new window))
- fixed increment/decrement value of embedded entity (#3182 (opens new window))
- fixed missing call
transformer.from()
in case column is NULL (#3395 (opens new window)) - fixed signatures of
update
/insert
methods, somefind*
methods in repositories, entity managers, BaseEntity and QueryBuilders - handle embedded documents through multiple levels in mongodb (#3551 (opens new window))
- fixed hanging connections in
mssql
driver (#3327 (opens new window))
# Features
- Injection 2nd parameter(options) of constructor to
ioredis/cluster
is now possible(#3538 (opens new window))
# 0.2.12 (2019-01-20)
# Bug Fixes
- fixed mongodb entity listeners and subscribers (#1527 (opens new window))
- fixed connection options builder - paramters parsed from url are assigned on top of options (#3442 (opens new window))
- fixed issue with logical operator precedence in
QueryBuilder
whereInIds
(#2103 (opens new window)) - fixed missing
isolationLevel
inConnection.transaction()
method (#3363 (opens new window)) - fixed broken findOne method with custom join column name
- fixed issue with uuid in mysql (#3374 (opens new window))
- fixed missing export of
Exclusion
decorator - fixed ignored extra options in mongodb driver (#3403 (opens new window), #1741 (opens new window))
- fixed signature of root
getRepository
function to acceptEntitySchema<Entity>
(#3402 (opens new window)) - fixed false undefined connection options passed into mongodb client (#3366 (opens new window))
- fixed ER_DUP_FIELDNAME with simple find (#3350 (opens new window))
# Features
- added
tslib
to reduce package size (#3457 (opens new window), #3458 (opens new window)) - queries are simplified in
findByIds
andwhereInIds
for simple entities with single primary key (#3431 (opens new window)) - added
ioredis
andioredis-cluster
cache support (#3289 (opens new window),#3364 (opens new window)) - added
LessThanOrEqual
andMoreThanOrEqual
find options (#3373 (opens new window)) - improve support of string, numeric and heterogeneous enums in postgres and mysql (#3414 (opens new window))
- default value of enum array in postgres is now possible define as typescript array (#3414 (opens new window))
@Column({
type: "enum",
enum: StringEnum,
array: true,
default: [StringEnum.ADMIN]
})
stringEnums: StringEnum[];
2
3
4
5
6
7
# Breaking changes
UpdateQueryBuilder
now throw error if update values are not provided or unknown property is passed into.set()
method (#2849 (opens new window),#3324 (opens new window))
# 0.2.11
- hot fix for mysql schema sync bug
# 0.2.10
- allowed caching options from environment variable (#3321)
- more accurate type for postgres ssl parameters
- added support for
ON UPDATE CASCADE
relations for mysql repository.save
returns union type- added reuse of lazy relationships
- added ability to disable prefixes for embedded columns
- migrations can be tested
- migration run returns array of successful migrations
- added debug ENV option
- added support for postgres exclusion constraints
- bug fixes
- documentation updates
- fixed issue with mysql primary generated uuid ER_TOO_LONG_KEY (#1139)
# 0.2.9
UpdateEvent
now returns with containsupdatedColumns
andupdatedRelations
# 0.2.8
- added support for specifying isolation levels in transactions
- added SQLCipher connection option for sqlite
- added driver to support Expo platform for sqlite
- added support for nativescript
- bug fixes
- documentation updates
# 0.2.7
- added support for rowversion type for mssql (#2198)
# 0.2.6
- fixed wrong aggregate and count methods signature in mongodb
# 0.2.5
- added support for enum arrays in postgres
- fixed issue with lazy relations (#1953)
- fixed issue with migration file generator using a wrong class name (#2070)
- fixed issue with unhandled promise rejection warning on postgres connection (#2067)
# 0.2.4
- fixed bug with relation id loader queries not working with self-referencing relations
- fixed issues with zerofill and unsigned options not available in column options (#2049)
- fixed issue with lazy relation loader (#2029)
- fixed issue with closure table not properly escaped when using custom schema (#2043)
- fixed issue #2053
# 0.2.3
- fixed bug with selecting default values after persistence when initialized properties defined
- fixed bug with find operators used on relational columns (#2031)
- fixed bug with DEFAULT as functions in mssql (#1991)
# 0.2.2
- fixing bugs with STI
- fixed bug in mysql schema synchronization
# 0.2.1
- fixed bug with STI
- fixed bug with lazy relations inside transactions
# 0.2.0
- completely refactored, improved and optimized persistence process and performance.
- removed cascade remove functionality, refactored how cascades are working.
- removed
cascadeRemove
option from relation options. - replaced
cascadeAll
withcascade: true
syntax from relation options. - replaced
cascadeInsert
withcascade: ["insert"]
syntax from relation options. - replaced
cascadeUpdate
withcascade: ["update"]
syntax from relation options. - now when one-to-one or many-to-one relation is loaded and its not set (set to null) ORM returns you entity with relation set to
null
instead ofundefined property
as before. - now relation id can be set directly to relation, e.g.
Post { @ManyToOne(type => Tag) tag: Tag|number }
withpost.tag = 1
usage. - now you can disable persistence on any relation by setting
@OneToMany(type => Post, post => tag, { persistence: false })
. This can dramatically improve entity save performance. loadAllRelationIds
method ofQueryBuilder
now accepts list of relation paths that needs to be loaded, alsodisableMixedMap
option is now by default set to false, but you can enable it via new method parameteroptions
- now
returning
andoutput
statements ofInsertQueryBuilder
support array of columns as argument - now when many-to-many and one-to-many relation set to
null
all items from that relation are removed, just like it would be set to empty array - fixed issues with relation update from one-to-one non-owner side
- now version column is updated on the database level, not by ORM anymore
- now created date and update date columns is set on the database level, not by ORM anymore (e.g. using
CURRENT_TIMESTAMP
as a default value) - now
InsertQueryBuilder
,UpdateQueryBuilder
andDeleteQueryBuilder
automatically update entities after execution. This only happens if real entity objects are passed. Some databases (like mysql and sqlite) requires a separate query to perform this operation. If you want to disable this behavior usequeryBuilder.updateEntity(false)
method. This feature is convenient for users who have uuid, create/update date, version columns or columns with DEFAULT value set. - now
InsertQueryBuilder
,UpdateQueryBuilder
andDeleteQueryBuilder
call subscribers and listeners. You can disable this behavior by settingqueryBuilder.callListeners(false)
method. Repository
andEntityManager
method.findOneById
is deprecated and will be removed in next 0.3.0 version. UsefindOne(id)
method instead now.InsertQueryBuilder
now returnsInsertResult
which contains extended information and metadata about runned queryUpdateQueryBuilder
now returnsUpdateResult
which contains extended information and metadata about runned queryDeleteQueryBuilder
now returnsDeleteResult
which contains extended information and metadata about runned query- now insert / update / delete queries built with QueryBuilder can be wrapped into a transaction using
useTransaction(true)
method of the QueryBuilder. insert
,update
anddelete
methods ofQueryRunner
now useInsertQueryRunner
,UpdateQueryRunner
andDeleteQueryRunner
inside- removed deprecated
removeById
,removeByIds
methods - removed
deleteById
method - usedelete(id)
method instead now - removed
updateById
method - useupdate(id)
method instead now - changed
snakeCase
utility - check table names after upgrading - added ability to disable transaction in
save
andremove
operations - added ability to disable listeners and subscribers in
save
andremove
operations - added ability to save and remove objects in chunks
- added ability to disable entity reloading after insertion and updation
- class table inheritance functionality has been completely dropped
- single table inheritance functionality has been fixed
@SingleEntityChild
has been renamed to@ChildEntity
@DiscriminatorValue
has been removed, instead parameter in@ChildEntity
must be used, e.g.@ChildEntity("value")
@DiscriminatorColumn
decorator has been removed, use@TableInheritance
options instead nowskipSync
in entity options has been renamed tosynchronize
. Now if it set to false schema synchronization for the entity will be disabled. By default its true.- now array initializations for relations are forbidden and ORM throws an error if there are entities with initialized relation arrays.
@ClosureEntity
decorator has been removed. Instead@Entity
+@Tree("closure-table")
must be used- added support for nested set and materialized path tree hierarchy patterns
- breaking change on how array parameters work in queries - now instead of (:param) new syntax must be used (:...param). This fixed various issues on how real arrays must work
- changed the way how entity schemas are created (now more type-safe), now interface EntitySchema is a class
- added
@Unique
decorator. Accepts custom unique constraint name and columns to be unique. Used only on as composite unique constraint, on table level. E.g.@Unique("uq_id_name", ["id", "name"])
- added
@Check
decorator. Accepts custom check constraint name and expression. Used only on as composite check constraint, on table level. E.g.@Check("chk_name", "name <> 'asd'")
- fixed
Oracle
issues, now it will be fully maintained as other drivers - implemented migrations functionality in all drivers
- CLI commands changed from
migrations:create
,migrations:generate
,migrations:revert
andmigrations:run
tomigration:create
,migration:generate
,migration:revert
andmigration:run
- changed the way how migrations work (more info in #1315). Now migration table contains
id
column with auto-generated keys, you need to re-create migrations table or add new column manually. - entity schemas syntax was changed
- dropped support for WebSql and SystemJS
@Index
decorator now acceptssynchronize
option. This option need to avoid deleting custom indices which is not created by TypeORM- new flag in relation options was introduced:
{ persistence: false }
. You can use it to prevent any extra queries for relations checks - added support for
UNSIGNED
andZEROFILL
column attributes in MySQL - added support for generated columns in MySQL
- added support for
ON UPDATE
column option in MySQL - added
SPATIAL
andFULLTEXT
index options in MySQL - added
hstore
andenum
column types support in Postgres - added range types support in Postgres
- TypeORM now uses
{ "supportBigNumbers": true, "bigNumberStrings": true }
options by default fornode-mysql
- Integer data types in MySQL now accepts
width
option instead oflength
- junction tables now have
onDelete: "CASCADE"
attribute on their foreign keys ancestor
anddescendant
columns in ClosureTable marked as primary keys- unique index now will be created for the join columns in
ManyToOne
andOneToOne
relations
# 0.1.19
- fixed bug in InsertQueryBuilder
# 0.1.18
- fixed timestamp issues
# 0.1.17
- fixed issue with entity order by applied to update query builder
# 0.1.16
- security and bug fixes
# 0.1.15
- security and bug fixes
# 0.1.14
- optimized hydration performance (#1672 (opens new window))
# 0.1.13
- added simple-json column type (#1448 (opens new window))
- fixed transform behaviour for timestamp columns (#1140 (opens new window))
- fixed issue with multi-level relations loading (#1504 (opens new window))
# 0.1.12
- EntitySubscriber now fires events on subclass entity (#1369 (opens new window))
- fixed error with entity schema validator being async (#1448 (opens new window))
# 0.1.11
- postgres extensions now gracefully handled when user does not have rights to use them (#1407 (opens new window))
# 0.1.10
sqljs
driver now enforces FK integrity by default (same behavior assqlite
)- fixed issue that broke browser support in 0.1.8 because of the debug package (#1344 (opens new window))
# 0.1.9
- fixed bug with sqlite and mysql schema synchronization when uuid column is used (#1332 (opens new window))
# 0.1.8
- New DebugLogger (#1302 (opens new window))
- fixed issue with primary relations being nullable by default - now they are not nullable always
- fixed issue with multiple databases support when tables with same name are used across multiple databases
# 0.1.7
- fixed bug with migrations execution in mssql (#1254 (opens new window))
- added support for more complex ordering in paginated results (#1259 (opens new window))
- MSSQL users are required to add "order by" for skip/offset operations since mssql does not support OFFSET/LIMIT statement without order by applied
- fixed issue when relation query builder methods execute operations with empty arrays (#1241 (opens new window))
- Webpack can now be used for node projects and not only for browser projects. To use TypeORM in Ionic with minimal changes checkout the ionic-example (opens new window) for the needed changes. To use webpack for non-Ionic browser webpack projects, the needed configuration can be found in the docs (opens new window) (#1280 (opens new window))
- added support for loading sub-relations in via find options (#1270 (opens new window))
# 0.1.6
- added support for indices and listeners in embeddeds
- added support for
ON CONFLICT
keyword - fixed bug with query builder where lazy relations are loaded multiple times when using
leftJoinAndSelect
(#996 (opens new window)) - fixed bug in all sqlite based drivers that generated wrong uuid columns (#1128 (opens new window) and #1161 (opens new window))
# 0.1.5
- fixed bug where
findByIds
would return values with an empty array (#1118 (opens new window)) - fixed bug in MigrationExecutor that didn't release created query builder (#1201 (opens new window))
# 0.1.4
- fixed bug in mysql driver that generated wrong query when using skip (#1099 (opens new window))
- added option to create query builder from repository without alias(#1084 (opens new window))
- fixed bug that made column option "select" unusable (#1110 (opens new window))
- fixed bug that generated mongodb projects what don't work (#1119 (opens new window))
# 0.1.3
- added support for
sql.js
. To use it you just need to installnpm i sql.js
and usesqljs
as driver type (#894 (opens new window)). - added explicit require() statements for drivers (#1143 (opens new window))
- fixed bug where wrong query is generated with multiple primary keys (#1146 (opens new window))
- fixed bug for oracle driver where connect method was wrong (#1177 (opens new window))
# 0.1.2
- sqlite now supports relative database file paths (#798 (opens new window) and #799 (opens new window))
- fixed bug with not properly working
update
method (#1037 (opens new window), #1042 (opens new window)) - fixed bug with replication support (#1035 (opens new window))
- fixed bug with wrong embedded column names being generated (#969 (opens new window))
- added support for caching in respositories (#1057 (opens new window))
- added support for the
citext
column type for postgres (#1075 (opens new window))
# 0.1.1
- added support for
pg-native
for postgres (#975). To use it you just need to installnpm i pg-native
and it will be picked up automatically. - now Find Options support
-1
and1
forDESC
andASC
values. This is better user experience for MongoDB users. - now inheritances in embeddeds are supported (#966).
isArray: boolean
inColumnOptions
is deprecated. Usearray: boolean
instead.- deprecated
removeById
method, now usedeleteById
method instead. - added
insert
anddelete
methods into repository and entity manager. - fixed multiple issues with
update
,updateById
andremoveById
methods in repository and entity manager. Now they do not usesave
andremove
methods anymore - instead they are using QueryBuilder to build and execute their queries. - now
save
method can accept partial entities. - removed opencollective dependency.
- fixed issues with bulk entity insertions.
- find* methods now can find by embed conditions.
- fixed issues with multiple schema support, added option to
@JoinTable
to support schema and database. - multiple small bugfixes.
# 0.1.0
# BREAKING CHANGES
Table
,AbstractTable
,ClassTableChild
,ClosureTable
,EmbeddableTable
,SingleTableChild
deprecated decorators were removed. UseEntity
,ClassEntityChild
,ClosureEntity
,SingleEntityChild
decorators instead.EntityManager#create
,Repository#create
,EntityManager#preload
,Repository#preload
,EntityManager#merge
,Repository#merge
methods now acceptDeepPartial<Entity>
instead ofObject
.EntityManager#merge
,Repository#merge
methods first argument is now an entity where to need to merge all given entity-like objects.- changed
find*
repository methods. Now conditions arePartial<Entity>
type. - removed
FindOptions
interface and introduced two new interfaces:FindOneOptions
andFindManyOptions
- each for its ownfindOne*
orfind*
methods. - dropped out some of options of
FindOptions
. UseQueryBuilder
instead. However, added few new options as well. - deprecated method
addParameters
has been removed fromQueryBuilder
. UsesetParameters
instead. - removed
setMaxResults
,setFirstResult
methods inQueryBuilder
. Usetake
andskip
methods instead. - renamed
entityManager
tomanager
inConnection
,AbstractRepository
and event objects.entityManager
property was removed. - renamed
persist
tosave
inEntityManager
andRepository
objects.persist
method was removed. SpecificRepository
is removed. Use relational query builder functionality instead.transaction
method has been removed fromRepository
. UseEntityManager#transaction
method instead.- custom repositories do not support container anymore.
- controller / subscriber / migrations from options tsconfig now appended with a project root directory
- removed naming strategy decorator, naming strategy by name functionality. Now naming strategy should be registered by passing naming strategy instance directly.
driver
section in connection options now deprecated. All settings should go directly to connection options root.- removed
fromTable
from theQueryBuilder
. Now use regularfrom
to select from tables. - removed
usePool
option from the connection options. Pooling now is always enabled. - connection options interface has changed and now each platform has its own set of connection options.
storage
in sqlite options has been renamed todatabase
.- env variable names for connection were changed (
TYPEORM_DRIVER_TYPE
has been renamed toTYPEORM_CONNECTION
, some other renaming). More env variable names you can find inConnectionOptionsEnvReader
class. - some api changes in
ConnectionManager
andcreateConnection
/createConnections
methods of typeorm main entrypoint. simple_array
column type now is calledsimple-array
- some column types were removed. Now orm uses column types of underlying database.
- now
number
type in column definitions (like@Column() likes: number
) maps tointeger
instead ofdouble
. This is more programmatic design. If you need to store float-pointing values - define a type explicitly. fixedLength
in column options has been removed. Now actual column types can be used, e.g.@Column("char")
or@Column("varchar")
.timezone
option has been removed from column options. Now corresponding database types can be used instead.localTimezone
has been removed from the column options.skipSchemaSync
in entity options has been renamed toskipSync
.setLimit
andsetOffset
inQueryBuilder
were renamed intolimit
andoffset
.nativeInterface
has been removed from a driver interface and implementations.- now typeorm works with the latest version of mssql (version 4).
- fixed how orm creates default values for SqlServer - now it creates constraints for it as well.
- migrations interface has changed - now
up
anddown
accept onlyQueryRunner
. To useConnection
andEntityManager
use properties ofQueryRunner
, e.g.queryRunner.connection
andqueryRunner.manager
. - now
update
method inQueryBuilder
acceptsPartial<Entity>
and property names used in update map are column property names and they are automatically mapped to column names. SpecificRepository
has been removed. Instead newRelationQueryBuilder
was introduced.getEntitiesAndRawResults
ofQueryBuilder
has been renamed togetRawAndEntities
.- in mssql all constraints are now generated using table name in their names - this is fixes issues with duplicate constraint names.
- now when object is loaded from the database all its columns with null values will be set into entity properties as null. Also after saving entity with unset properties that will be stored as nulls - their (properties) values will be set to null.
- create and update dates in entities now use date with fractional seconds.
@PrimaryGeneratedColumn
decorator now accept generation strategy as first argument (default isincrement
), instead of column type. Column type must be passed in options object, e.g.@PrimaryGeneratedColumn({ type: "bigint"})
.@PrimaryColumn
now does not acceptgenerated
parameter in options. Use@Generated
or@PrimaryGeneratedColumn
decorators instead.- Logger interface has changed. Custom logger supply mechanism has changed.
- Now
logging
options in connection options is simple "true", or "all", or list of logging modes can be supplied. - removed
driver
section in connection options. Define options right in the connection options section. Embedded
decorator is deprecated now. use@Column(type => SomeEmbedded)
instead.schemaName
in connection options is removed. Useschema
instead.TYPEORM_AUTO_SCHEMA_SYNC
env variable is now calledTYPEORM_SYNCHRONIZE
.schemaSync
method inConnection
has been renamed tosynchronize
.getEntityManager
has been deprecated. UsegetManager
instead.@TransactionEntityManager
is now called@TransactionManager
now.EmbeddableEntity
,Embedded
,AbstractEntity
decorators has been removed. There is no need to useEmbeddableEntity
andAbstractEntity
decorators at all - entity will work as expected without them. Instead of@Embedded(type => X)
decorator now@Column(type => X)
must be used instead.tablesPrefix
,autoSchemaSync
,autoMigrationsRun
,dropSchemaOnConnection
options were removed. UseentityPrefix
,synchronize
,migrationsRun
,dropSchema
options instead.- removed
persist
method from theRepository
andEntityManager
. Usesave
method instead. - removed
getEntityManager
fromtypeorm
namespace. UsegetManager
method instead. - refactored how query runner works, removed query runner provider
- renamed
TableSchema
intoTable
- renamed
ColumnSchema
intoTableColumn
- renamed
ForeignKeySchema
intoTableForeignKey
- renamed
IndexSchema
intoTableIndex
- renamed
PrimaryKeySchema
intoTablePrimaryKey
# NEW FEATURES
- added
mongodb
support. - entity now can be saved partially within
update
method. - added prefix support to embeddeds.
- now embeddeds inside other embeddeds are supported.
- now relations are supported inside embeds.
- now relations for multiple primary keys are generated properly.
- now ormconfig is read from
.env
,.js
,.json
,.yml
,.xml
formats. - all database-specific types are supported now.
- now migrations generation in mysql is supported. Use
typeorm migrations:generate
command. getGeneratedQuery
was renamed togetQuery
inQueryBuilder
.getSqlWithParameters
was renamed togetSqlAndParameters
inQueryBuilder
.- sql queries are highlighted in console.
- added
@Generated
decorator. It can acceptstrategy
option with valuesincrement
anduuid
. Default isincrement
. It always generates value for column, except when column defined asnullable
and user setsnull
value in to column. - added logging of log-running requests.
- added replication support.
- added custom table schema and database support in
Postgres
,Mysql
andSql Server
drivers. - multiple bug fixes.
- added ActiveRecord support (by extending BaseEntity) class
Connection
how hascreateQueryRunner
that can be used to control database connection and its transaction stateQueryBuilder
is abstract now and all different kinds of query builders were created for different query types -SelectQueryBuilder
,UpdateQueryBuilder
,InsertQueryBuilder
andDeleteQueryBuilder
with individual method available.
# 0.0.11
- fixes #341 (opens new window) - issue when trying to create a
OneToOne
relation withreferencedColumnName
where the relation is not between primary keys
# 0.0.10
- added
ObjectLiteral
andObjectType
into main exports - fixed issue fixes #345 (opens new window).
- fixed issue with migration not saving into the database correctly. Note its a breaking change if you have run migrations before and have records in the database table, make sure to apply corresponding changes. More info in #360 (opens new window) issue.
# 0.0.9
- fixed bug with indices from columns are not being inherited from parent entity #242 (opens new window)
- added support of UUID primary columns (thanks @seanski (opens new window))
- added
count
method to repository and entity manager (thanks @aequasi (opens new window))
# 0.0.8
- added complete babel support
- added
clear
method toRepository
andEntityManager
which allows to truncate entity table - exported
EntityRepository
intypeorm/index
- fixed issue with migration generation in #239 (opens new window) (thanks to @Tobias4872 (opens new window))
- fixed issue with using extra options with SqlServer #236 (opens new window) (thanks to @jmai00 (opens new window))
- fixed issue with non-pooled connections #234 (opens new window) (thanks to @benny-medflyt (opens new window))
- fixed issues: #242 (opens new window), #240 (opens new window), #204 (opens new window), #219 (opens new window), #233 (opens new window), #234 (opens new window)
# 0.0.7
- added custom entity repositories support
- merged typeorm-browser and typeorm libraries into single package
- added
@Transaction
decorator - added exports to
typeorm/index
for naming strategies - added shims for browsers using typeorm in frontend models, also added shim to use typeorm with class-transformer library on the frontend
- fixed issue when socketPath could not be used with mysql driver (thanks @johncoffee)
- all table decorators are renamed to
Entity
(Table
=>Entity
,AbstractTable
=>AbstractEntity
,ClassTableChild
=>ClassEntityChild
,ClosureTable
=>ClosureEntity
,EmbeddableTable
=>EmbeddableEntity
,SingleTableChild
=>SingleEntityChild
). This change is required because upcoming versions of orm will work not only with tables, but also with documents and other database-specific "tables". Previous decorator names are deprecated and will be removed in the future. - added custom repositories support. Example in samples directory.
- cascade remove options has been removed from
@ManyToMany
,@OneToMany
decorators. Also cascade remove is not possible from two sides of@OneToOne
relationship now. - fixed issues with subscribers and transactions
- typeorm now has translation in chinese (thanks @brookshi (opens new window))
- added
schemaName
support for postgres database #152 (opens new window) (thanks @mingyang91 (opens new window)) - fixed bug when new column was'nt added properly in sqlite #157 (opens new window)
- added ability to set different types of values for DEFAULT value of the column #150 (opens new window)
- added ability to use zero, false and empty string values as DEFAULT values in #189 (opens new window) (thanks to @Luke265 (opens new window))
- fixed bug with junction tables persistence (thanks @Luke265 (opens new window))
- fixed bug regexp in
QueryBuilder
(thanks @netnexus (opens new window)) - fixed issues #202 (opens new window), #203 (opens new window) (thanks to @mingyang91 (opens new window))
- fixed issues #159 (opens new window), #181 (opens new window), #176 (opens new window), #192 (opens new window), #191 (opens new window), #190 (opens new window), #179 (opens new window), #177 (opens new window), #175 (opens new window), #174 (opens new window), #150 (opens new window), #159 (opens new window), #173 (opens new window), #195 (opens new window), #151 (opens new window)
# 0.0.6
- added
JSONB
support for Postgres in #126 (thanks @CreepGin (opens new window)@CreepGin) - fixed in in sqlite query runner in #141 (thanks @marcinwadon (opens new window))
- added shortcut exports for table schema classes in #135 (thanks @eduardoweiland (opens new window))
- fixed bugs with single table inheritance in #132 (thanks @eduardoweiland (opens new window))
- fixed issue with
TIME
column in #134 (thanks @cserron (opens new window)) - fixed issue with relation id in #138 (thanks @mingyang91 (opens new window))
- fixed bug when URL for pg was parsed incorrectly #114 (thanks @mingyang91 (opens new window))
- fixed bug when embedded is not being updated
- metadata storage now in global variable
- entities are being loaded in migrations and can be used throw the entity manager or their repositories
- migrations now accept
EntityMetadata
which can be used within one transaction - fixed issue with migration running on windows #140
- fixed bug with with Class Table Inheritance #144
# 0.0.5
- changed
getScalarMany
togetRawMany
inQueryBuilder
- changed
getScalarOne
togetRawOne
inQueryBuilder
- added migrations support
# 0.0.4
- fixed problem when
order by
is used withlimit
- fixed problem when
decorators-shim.d.ts
exist and does not allow to import decorators (treats like they exist in global) - fixed Sql Server driver bugs
# 0.0.3
- completely refactored persistence mechanism:
- added experimental support of
{ nullable: true }
in relations - cascade operations should work better now
- optimized all queries
- entities with recursive entities should be persisted correctly now
- added experimental support of
- now
undefined
properties are skipped in the persistence operation, as well asundefined
relations. - added platforms abstractions to allow typeorm to work on multiple platforms
- added experimental support of typeorm in the browser
- breaking changes in
QueryBuilder
:getSingleResult()
renamed togetOne()
getResults()
renamed togetMany()
getResultsAndCount()
renamed togetManyAndCount()
- in the innerJoin*/leftJoin* methods now no need to specify
ON
- in the innerJoin*/leftJoin* methods no longer supports parameters, use
addParameters
orsetParameter
instead. setParameters
is now works just likeaddParameters
(because previous behaviour confused users),addParameters
now is deprecatedgetOne
returnsPromise<Entity|undefined>
- breaking changes in
Repository
andEntityManager
:findOne
and .findOneByIdnow return
Promise<Entity|undefined>instead of
Promise`
- now typeorm is compiled into
ES5
instead ofES6
- this allows to run it on older versions of node.js - fixed multiple issues with dates and utc-related stuff
- multiple bugfixes
# 0.0.2
- lot of API refactorings
- complete support TypeScript 2
- optimized schema creation
- command line tools
- multiple drivers support
- multiple bugfixes
# 0.0.1
- first stable version, works with TypeScript 1.x