This commit updates the CircleCI images to the new convenience images
(cimg/... instead of circleci/...), as the old ones were deprecated.
Sadly, they do not come with major-only tags.
See the following blog post for more information:
https://circleci.com/docs/next-gen-migration-guide/
Also, the apt cache was not updated before downloading additional
packages.
Thus, an update of the apt cache should fix getting the right packages.
Related to #10100
Oracle does not have a `onUpdate: 'CASCADE'` option.
Thus, the test fixtures had to be adapted.
Checking for the correct `onUpdate` actions for Oracle was introduced in #9786.
* added transaction retry logic in cockroachdb
* added option to control max transaction retries;
added delay before transaction retry;
updated docs;
* fixes in retry logic
* enable storing queries after retrying transaction
* test(select-buildwhere): exercise More/LessThanOrEqual for relations
Extract the relevant test suite from functional/find-options, modifying
the tests to use the equivalent More/LessThanOrEqual operators
* fix(select-buildwhere): support More/LessThanOrEqual for relations
Tweak `buildWhere()` to recognise more find operators and output
the SQL equivalent
- Recognise `moreThanOrEqual` and `lessThanOrEqual`, in addition to
`moreThan` and `lessThan`
- If the find operator ends with `OrEqual`, append `=` to the
SQL operator
* code style change
---------
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
* test: test saving disciminators STI, cascading
This commit adds an test for checking whether discriminators are saved
correctly when saving a field with cascade that uses
Single-Table-Inheritance.
Related to: #7758
* fix: Create correct children with STI
This commit fixes the `create` function for EntityManager and Repository
to create entities of correct type when using Single Table Inheritance.
Refactors the otherwise repeated code into a new function on
EntityMetadata.
Related to: #7758
* test: check STI type setting discriminator manually
Related to: #9033
* feature: allow setting discriminator value manually
This commit allows using an instance of a base class in a
Single Table Inheritance scenario and setting the discriminator value
manually.
Related to: #9033
* test: test saving disciminators with trees in STI
This commit adds an test for checking whether discriminators are saved
correctly when saving a tree that also uses Single-Table-Inheritance.
Related to: #7758
* fix: Create correct children with STI and trees
This commit fixes the `create` function for EntityManager and TreeRepository
to create entities of correct type when using Single Table Inheritance
and complex inheritance with Trees.
Related to: #7758
* fix: correct encode mongodb auth credentials
when use the special character `@` into mongodb password result in unauthorized because the it has no encoding
Closes: #9885
* we need to close connections at the end
* fixed js issue
* adjust import statement
* style: run prettier
---------
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
* fix: Convert the join table ID to the referenceColumn ID type
* test: add auto-increment-id-as-string test
* style: format auto-increment-id-as-string test
This patch allows the getFromCache caller to only pass in
identifier or query field, as getFromCache already handles
the identifier and query field checks
Co-authored-by: ru.c <ru@shuffle.com>
* Update SelectQueryBuilder.ts
Bug fix, In case a unique alias is created in first query then result was not getting mapped properly.
* lint fix
---------
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
* fix: add support for mongodb driver v5
This new fix allow support to mongodb driver v5
Closes: #7907
* refactor: remove callback from MongoDriver connect
* fix: check for propertyName in transform
* fix: add support for mongodb driver v5
This new fix allow support to mongodb driver v5
Closes: #7907
* feat: mongodb 5.2.0 typings
* fix: instanceof ObjectId check
Instanceof check now no longer references to just the
type but the loaded class ref instead.
* test: fix test name to mongodb v5
---------
Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
Co-authored-by: tgrassl <grassl.timon@gmail.com>
Co-authored-by: Matheus Melo Antiquera <matheus.melo.a@hotmail.com>
* test: cli init with local typeorm package
Uses the locally built files instead of the typeorm
package published to npmjs. This enables testing project
initialisation with unreleased typeorm package versions.
* fix: enable init cli to be testable w non-releases
* small optimization in driver utils - shortening alias become a bit faster
* added entity metadatas as a map into DataSource for search optimization purposes
* ultra small optimization - looks like symbols work slow. Need to re-think its usage
* small optimizations to improve performance
* replace property names optimization
* tsc error fix
* big optimization - now replacePropertyNames executed only for the final SQL query
* trying to fix the bug in select query builder with orders not being properly replaced with their aliaces
* fixing tests
Adds support to loading entities' relationships with "query" strategy for TreeRepositories
Previously the default method was "join". Implementation is done recursively for n-level
relations
Closes: #9673
* feat: leftJoinAndMapOne and innerJoinAndMapOne now map correctly with QueryBuilder
When joining to a query builder instead of an entity or table name, typeorm now
correctly supports mapping the result to an entity. This introduces a new argument
to the join functions to supply the join attributes with a source of meta data
for the mapping
For example:
const loadedPost = await connection.manager
.createQueryBuilder(Post, "post")
.innerJoinAndMapOne(
"post.tag",
qb => qb.from(Tag, "tag"),
"tag",
"tag.id = post.tagId",
undefined,
// The next argument is new - it helps typeorm know which entity
// to use to complete the mapping for a query builder.
Tag
)
.where("post.id = :id", { id: post.id })
.getOne()
* style: Auto Formatting
* trigger CircleCI
---------
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
* fix: transform values for FindOperators
Closes: #9381
* refactor: simplify correction
do not transform value, when it is a FindOperator
Closes: #9381
* fix: transform value of FindOperator when it is not a FindOperator
Closes: #9381#9816
* fix: perform transformation on the array instead of each value in case of JsonContains
* fix: remove anti pattern, correct functionality for operators without multiple parameter
* fix: correct linting
* fix: resolve issue when parameterValue is not an instanceof FindOperator
---------
Co-authored-by: ke <ke@sbs.co.at>
* fix: prevent foreign keys support during migration batch under sqlite
Schema changes in migrations batch cannot be done on table which has referring
foreign keys with ON DELETE CASCADE without deleting its content.
Closes: #9770
* Update MigrationExecutor.ts
* Update command.ts
---------
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>