Between v3 and v4 in node-redis the client options changed for a collection of socket related
paramaters. In the caching documentation the v3 format for used for `host` and `socket`. When
following the documented example the redis client would default to `localhost` even when a
different value for `host` was specified.
Closes: #9987
* test: fix migration-generate test suite
WIP
Closes: #10360
* fixed mssql test hang;
added option to disable process exit;
---------
Co-authored-by: Alex Messer <dmzt08@gmail.com>
For previous examples typescript error occurs in createQueryBuilder that says “Argument of type 'string' is not assignable to parameter of type 'QueryRunner'.ts(2345)”.
If you check the type of createQueryBuilder, the string cannot come as the first argument.
The types of createQueryBuilder are as follows.
myDataSource.createQueryBuilder<ObjectLiteral>(entityClass: EntityTarget<ObjectLiteral>, alias: string, queryRunner?: QueryRunner | undefined):
Disabling the raft log is going to be disallowed in CockroachDB. Also,
this setting wasn't having any effect, since the tests use an in-memory
cluster.
* fix: ensure comparing EntityMapIds in `buildForSubjectRelation`
I have found the issue (for me at least). In the method `buildForSubjectRelation` of `ManyToManySubjectBuilder`, in order to know if it is needed to insert the relation rows `databaseRelatedEntityIds` is compared with `relatedEntityRelationIdMap` (line 154). The problem is that `databaseRelatedEntityIds` is not always an "EntityIdMap". If one is overloading the entity in the `afterLoad` event of an EventSubscriber for example the line 102 :
`const databaseRelatedEntityValue = relation.getEntityValue(subject.databaseEntity);` will return an "enhanced" object with additional properties. To fix this, in this commit, we ensure that `databaseRelatedEntityIds` is containing an "EntityIdMap".
Closes#5704
* refactor: describe.only -> describe
removes describe.only.
* style: npm run format
format code.
* Update issue-5704.ts
refactor: typo on post title
---------
Co-authored-by: blemoine <services+bitbucket@blemoine.pro>
* fix: resolve issue building eager relation alias for nested relations
Fix alias error for nested relations. When loading eager relations from
nested levels only the first level was handled through the alias builder
Closes: #9944
* fix: update test: issue-9944 to include postgres
Add postgress as enabled driver for test "issue-9944"
* fix: resolve issue building eager relations withput parsing for "." to get relations
Fix alias error for nested relations by usinf relation.propertyName instead of relation.propertyPath
By using property path, we would have to parse for "." to get the nested relations, but that could
bring issued with column names that had dots within the name.
The solution to `loadDataSource` was probably designed to adapt to various forms of exports coming from ormconfig.js however it failed to adapt to a very regular case where you just do `module.exports = new DataSource({ ... })` resulting in `Error: Given data source file must contain export of a DataSource instance`
Fixes#8810
* modify repository.extend method. so chainning call this method is possible
* npm run format
* add @ts-ignore at a line
* Object.assign is no more needed
* change code to remove @ts-ignore
This adds a new property `disableAsciiToUnicodeParamConversion` to `SqlServerConnectionOptions` to
control whether the `MssqlParameter` types char, varchar, and text are converted to their unicode
equivalents, nchar, nvarchar, and ntext. This defaults to false, maintaining the current behavior.
Closes: #10131
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