CHANGELOG

​0.2.41 (2021-11-18)

Bug Fixes

  • add retryWrites to MongoConnectionOptions (#8354) (c895680), closes #7869​
  • create typeorm_metadata table when running migrations (#4956) (b2c8168)
  • db caching won't work with replication enabled (#7694) (2d0abe7), closes #5919​
  • incorrect composite UNIQUE constraints detection (#8364) (29cb891), closes #8158​
  • Postgres enum generates unnecessary queries on schema sync (#8268) (98d5f39)
  • resolve issue delete column null on after update event subscriber (#8318) (8a5e671), closes #6327​

Features

​0.2.40 (2021-11-11)

Bug Fixes

  • BaseEntity finder methods to properly type-check lazy relations conditions (#5710) (0665ff5)

Features

  • add depth limiter optional parameter when loading nested trees using TreeRepository's findTrees() and findDescendantsTree() (#7926) (0c44629), closes #3909​
  • add upsert methods for the drivers that support onUpdate (#8104) (3f98197), closes #2363​
  • Postgres IDENTITY Column support (#7741) (969af95)

Reverts

​0.2.39 (2021-11-09)

Bug Fixes

  • attach FOR NO KEY UPDATE lock to query if required (#8008) (9692930), closes #7717​
  • cli should accept absolute paths for --config (4ad3a61)
  • create a different cacheId if present for count query in getManyAndCount (#8283) (9f14e48), closes #4277​
  • defaults type cast filtering in Cockroachdb (#8144) (28c183e), closes #7110 #7110​
  • do not generate migration for unchanged enum column (#8161) (#8164) (4638dea)
  • NativescriptQueryRunner's query method fails when targeting es2017 (#8182) (8615733)
  • OneToManySubjectBuilder bug with multiple primary keys (#8221) (6558295)
  • ordering by joined columns for PostgreSQL (#3736) (#8118) (1649882)
  • support DeleteResult in SQLiteDriver (#8237) (b678807)

Features

  • add typeorm command wrapper to package.json in project template (#8081) (19d4a91)
  • add dependency configuraiton for views #8240 (#8261) (2c861af)
  • add relation options to all tree queries (#8080) (e4d4636), closes #8076​
  • add the ability to pass the driver into all database types (#8259) (2133ffe)
  • more informative logging in case of migration failure (#8307) (dc6f1c9)
  • support using custom index with SelectQueryBuilder in MySQL (#7755) (f79ae58)

Reverts

  • Revert "fix: STI types on children in joins (#3160)" (#8309) (0adad88), closes #3160 #8309​

​0.2.38 (2021-10-02)

Bug Fixes

  • prevent using absolute table path in migrations unless required (#8038) (e9366b3)
  • snakecase conversion for strings with numbers (#8111) (749511d)
  • use full path for table lookups (#8097) (22676a0)

Features

​0.2.37 (2021-08-13)

Bug Fixes

  • allow periods in parameter identifiers (#8022) (4201938)
  • ConnectionManager connections property should include list of Connections (#8004) (2344db6)
  • entity value for date columns that are related (#8027) (5a3767f)
  • handle brackets when only one condition is passed (#8048) (ab39066)
  • handle enums with multiple apostrophes in MySQL (#8013) (37c40a6), closes #8011​
  • include all drivers in driverfactory error message (#8061) (fbd1ef7)
  • resolve not returning soft deleted relations with withDeleted find option (#8017) (65cbcc7)
  • SAP HANA inserts used incorrect value for returning query (#8072) (36398db)
  • some drivers set the wrong database name when defined from url (#8058) (a3a3284)
  • throw error when not connected in drivers (#7995) (cd71f62)

Features

​0.2.36 (2021-07-31)

Bug Fixes

  • add deprecated WhereExpression alias for WhereExpressionBuilder (#7980) (76e7ed9)
  • always generate migrations with template string literals (#7971) (e9c2af6)
  • use js rather than ts in all browser package manifests (#7982) (0d90bcd)
  • use nvarchar/ntext during transit for SQLServer queries (#7933) (62d7976)

Features

  • add postgres connection option applicationName (#7989) (d365acc)

​0.2.35 (2021-07-28)

Bug Fixes

  • entity to be Partial<Entity> | undefined in UpdateEvent (#7783) (f033045)
  • actually return a working ReadStream from SQL Server query runner (#7893) (e80985f)
  • added version check before dropping materialized views to keep backward compatibility (#7716) (29f1f86)
  • allow for string id in mongo.findByIds call (#7838) (4b45ae1)
  • better support of relation-based properties in where clauses (#7805) (3221c50)
  • Buffer in primary columns causes bugs with relations (#7952) (37e08a7), closes #4060​
  • capacitor does not correctly set journal mode (#7873) (5f20eb7)
  • Capacitor driver PRAGMA requests failing on Android (#7728) (9620a26)
  • condition is optional in SelectQueryBuilder joins (#7888) (2deaa0e)
  • correctly handle mongo replica set driver option (#7908) (9212df4)
  • correctly load yml in ConnectionOptionsYmlReader (#7743) (57f9254)
  • craft oracle connectString as a descriptor with SID (#7878) (b05d093)
  • delete operation in MongoDB impact all matched documents (#7811) (0fbae53), closes #7809​
  • Do not add NULL/NOT NULL for stored columns (#7708) (3c33e9f), closes #7698​
  • do OBJECT_ID lookup for column constraint instead of name in mssql (#7916) (fa8c1b0)
  • drop pool.autostart from mssql options because it's unused (#7877) (0d21a4d)
  • drop SAP statement after prepare per Hana client docs (#7748) (8ca05b1)
  • eager relation respects children relations (#5685) (e7e887a)
  • enable returning additional columns with MSSQL (#7864) (e1db48d)
  • entity object undefined in afterUpdate subscriber (#7724) (d25304d)
  • find operation in MongoDB do not include nullable values from documents (#7820) (98c13cf), closes #7760​
  • fix table loading when schemas are used (3a106a3)
  • foreign keys in SAP were loading from the wrong table (#7914) (4777a79)
  • handle postgres default when tableColumn.default is not string (#7816) (0463855)
  • handle snake case of ABcD which should become a_bc_d (#7883) (eb680f9)
  • improve query for MSSQL to fetch foreign keys and tables (#7935) (f6af01a)
  • make OracleQueryRunner createDatabase if-not-exists not fail (f5a80ef)
  • only pass data from SaveOptions during that query (#7886) (1de2e13)
  • oracle cannot support DB in table identifiers (#7954) (8c60d91)
  • pass table to namingstrategy when we can instead of table name (#7925) (140002d)
  • prevent modification of the FindOptions.relations (#7887) (a2fcad6)
  • prevent reuse of broken connections in postgres pool (#7792) (5cf368a)
  • prevent transactions in the Cordova driver (#7771) (fc4133c)
  • properly escape oracle table paths (#7917) (7e8687c)
  • regression when making join conditions undefined-able (#7892) (b0c1cc6)
  • restored buildColumnAlias for backward compatibility (#7706) (36ceefa)
  • return correct DeleteResult and UpdateResult for mongo (#7884) (7a646a2)
  • support fully qualified schema in createSchema (#7934) (94edd12)
  • support table names between schemas in oracle (#7951) (aa45b93)
  • typing so SelectQueryBuilder.getRawOne may return undefined (#7863) (36e5a0c), closes #7449​
  • typo prevented us from pulling the schema correctly in some cases (c7f2db8)
  • update operation in MongoDB impact all matched documents (#7803) (052014c), closes #7788​
  • use correct query for cross-database mssql identity check (#7911) (7869fb1)
  • use fully qualified and escaped table names for oracle (#7857) (2b90725), closes #7779​
  • use ObjectLiteral in UpdateEvent rather than Entity (#7910) (78fbc14)
  • use only table name in constraint naming strategy (5dc777f)

Features

​0.2.34 (2021-06-03)

Bug Fixes

  • restored buildColumnAlias for backward compatibility (#7706) (36ceefa)

​0.2.33 (2021-06-01)

Bug Fixes

Features

  • add orphanedRowAction option to EntitySchemaRelationOptions (#7625) (a8eb49a), closes #7417​
  • add set datatype support for aurora-data-api (#7665) (b6c1836)
  • add support for specifying ioredis cache with a URL (#7689) (e017f9b), closes #7631​
  • add tree entities update and delete logic (#7156) (9c8a3fb), closes #7155​
  • added Capacitor driver (#7695) (0f7a778)
  • cache option to ignore errors (#7630) (5fde0ea), closes #926​
  • define class properties for QueryFailedError to allow users to access a typed error (#7529) (b43dcba)
  • support MAX_EXECUTION_TIME for MySQL driver. (#7638) (0564c34)

​0.2.32 (2021-03-30)

Bug Fixes

Features

  • add check and dry-run to migration generate (#7275) (d6df200), closes #3037 #6978​
  • add option for installing package using CLI (#6889) (3d876c6)
  • Add support for Access Token Authentication for SQL Server Driver (mssql) (#7477) (e639772)
  • added socketPath support for replicas in MySQL driver (#7459) (8d7afaf)
  • allow to pass the given table name as string in RelationDecorators (#7448) (4dbb10e)
  • implement "FOR UPDATE OF" for postgres driver (#7040) (fde9f07)
  • 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) (7793b3f)
  • output Javascript Migrations instead of TypeScript (#7294) (b97cc4f)

​0.2.31 (2021-02-08)

Bug Fixes

  • append condition to STI child entity join (#7339) (68bb82e)
  • avoid regex lookbehind for compatibility (#7270) (063d27f), closes #7026​
  • cache from ENV - add ioredis support (#7332) (5e2117c)
  • datetime2 rounding in mssql (#7264) (4711a71), closes #3202​
  • escape columns in InsertQueryBuilder.orUpdate (#6316) (ab56e07)
  • incorrect postgres uuid type in PrimaryGeneratedColumnType (#7298) (2758502)
  • MariaDB VIRTUAL + [NOT NULL|NULL] error (#7022) (82f2b75), closes #2691​
  • reject nullable primary key columns (#7001) (cdace6e)
  • resolve issue with find with relations returns soft-deleted entities (#7296) (d7cb338), closes #6265​
  • save does not return id, save does not return generated (#7336) (01a6aee)

Features

BREAKING CHANGES

  • passing ColumnOptions to @PrimaryColumn does not function anymore. One must use PrimaryColumnOptions instead.
  • minor breaking change on "conflict*" options - column names used are now automatically escaped.

​0.2.30 (2021-01-12)

Bug Fixes

  • add missing "comment" field to QB clone method (#7205) (f019771), closes #7203​
  • avoid early release of PostgresQueryRunner (#7109) (#7185) (9abe007)
  • Error when sorting by an embedded entity while using join and skip/take (#7082) (d27dd2a), closes #7079​
  • Fix CLI query command TypeError (#7043) (b35397e)
  • get length attribute of postgres array columns (#7239) (eb82f78), closes #6990​
  • handle overlapping property / database names in querybuilder (#7042) (b518fa1), closes #7030​
  • improve stack traces when using persist executor (#7218) (0dfe5b8)
  • order should allow only model fields, not methods (#7188) (0194193), closes #7178​
  • resolve migration for UpdateDateColumn without ON UPDATE clause (#7057) (ddd8cbc), closes #6995​
  • resolves Postgres sequence identifier length error (#7115) (568ef35), closes #7106​
  • return 'null' (instead of 'undefined') on lazy relations that have no results (#7146) (#7147) (9b278c9)
  • support MongoDB DNS seed list connection (#7136) (f730bb9), closes #3347 #3133​
  • data-api: Fixed how data api driver uses and reuses a client (#6869) (6ce65fb)
  • use default import of yargs for --help (#6986) (6ef8ffe)

Features

​0.2.29 (2020-11-02)

Bug Fixes

Features

  • add ability for escaping for Raw() find operator (#6850) (91b85bf)
  • add absolute path support to other CLI commands (#6807) (d9a76e9)
  • Add SelectQueryBuilder.getOneOrFail() (#6885) (920e781), closes #6246​
  • backport ilike from next (#6862) (c8bf81e)
  • Exit with code 1 on empty migration:generate (#6978) (8244ea1)
  • schema synchronization for partitioned tables with PostgreSQL 12+ (#6780) (990442e)
  • support autoEncryption option for MongoDB (#6865) (b22c27f)
  • Support column comments in Postgres and CockroachDB (#6902) (bc623a4), closes #3360​
  • support ESM in ormconfig js & ts (#6853) (7ebca2b), closes #5003​
  • support query comments in the query builder (#6892) (84c18a9), closes #3643​
  • transactional events in subscriber interface + "transaction" option in FindOptions (#6996) (0e4b239)

Performance Improvements

​0.2.28 (2020-09-30)

Bug Fixes

​0.2.27 (2020-09-29)

Bug Fixes

Features

  • add option to pass postgres server notices to client logger (#6215) (5084e47), closes