forked from typeorm/typeorm
-
Notifications
You must be signed in to change notification settings - Fork 0
update master #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"plan javascript object" -> "plain javascript object"
Previous URL returns a 404
…6106) Co-authored-by: Sergio Durban Belmonte <sdurban@leadtech.com>
Weirdly search sent me here, and it took a while to find the real TypeORM website.
This reverts commit 50a0641.
* fixed #5718 * removed .only
There was no documented way of setting a connection timeout for the postgres driver. We recently ran into an issue with our network that caused a container to hang indefinitely attempting to connect to postgres. We managed to resolve the issue by setting 'connectionTimeoutMillis' in the 'extra' field of our connection options. This approach does not appear to be documented anywhere. Seeing that MongoDB and MySQL drivers both support a connection timeout as part of the documented API, we felt it made sense to add a similar option to the Postgres driver and hopefully avoid some headaches down the road. This commit adds a 'connectTimeoutMS' option to the postgres driver that gets translated to the appropriate field for the pg library. It also updates the documentation to reflect this new option. Because the default behavior of the underlying pg library is to attempt to connect indefinitely, we didn't feel like it was a safe change to introduce a default timeout, even if that's more sane behavior. As mentioned earlier, both the MySQL and MongoDB drivers support a connection timeout option. MySQL uses 'connectTimeout' while MongoDB uses 'connectTimeoutMS'. We went with 'connectTimeoutMS' as to not introduce yet another name for a connection timeout, and because the 'MS' suffix makes it clearer what is expected. We hope a future PR may adjust the MySQL connection options to adopt the same name, but will leave that up to someone with a stronger opinion.
The `repository` variable is not defined in the first Data Mapper pattern example
JSON body parser is now built-in by default (>4.16.0), hence no need for body-parser
Grammatical error
Example for querying subdocuments and array of subdocuments
* fix: properly override database url properties Closes #4878 * test: add test for overriding url options
* support cjs extension for ormconfig * fix linting errors * handle cjs extensions in class loader
…lDriver (#6237) fix: lint warning Co-authored-by: shitong.zheng <shitong.zheng@shopee.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ns.md cascades link (#6406) * docs: one-to-one-relations.md cascades link * docs: many-to-one-one-to-many-relations.md cascades link
the CLI command `query` had an implicit `query` positional parameter and in earlier versions of yargs that was okay - but in the later versions aiming for more correct code they've refactored it to not support that explicitly define the `query` positional parameter & add a helpful description so people can tell what it is for fixes #6896
add a `comment` method to the QueryBuilder so we can include an arbitrary comment in our queries for a variety of purposes - from query plan stability to SQL reverse proxy routing, to debugging. the comment builder is supported in selects, inserts, deletes, and updates this is directly inspired by the functionality supported by hibernate to handle SQL Query comments it uses C-style queries which are ANSI SQL 2003 & supported in all of the dialects of SQL that we support as drivers fixes #3643
This adds a `getOneOrFail` which which is to `getOne` as `findOneOrFail` is to `findOne` - it never returns `undefined`, it will instead throw an `EntityNotFoundError` closes #6246
Correct the description for setting a custom table name for the typeorm cache.
the query comment test was causing problems in a few other PRs because it expects a very specific comment then verb pattern - which may or may not always be the case.
update the ConnectionOptionsReader so that ormconfig.env files are loaded as expected from the filesystem & included as a dotenv configuration
the `buildDriverOptions` parses the URL & will have undefined values which it ends up overwriting non-undefined values with - which isn't great
test 6900 only ran correctly in local testing & didn't correctly handle the different hostnames in CI / CD
in the mysql driver, column comments were only half supported - adding them to new columns & new tables was possible, but updating existing columns to include comments was not possible there also was no escaping done on the column comments - so depending on the contents of your comment, an invalid query could be generated adds support to add comments to existing columns, adds simple comment escaping code, & creates tests to verify the behavior
adds support for column comments to both the Postgres and CockroachDB driver - for migrations & in metadata. also includes new tests that validate the functionality works as expected fixes #3360
I haven't inspected the code to know if string or any other type does get returned, but this can at least inform people without needing to inspect the code that it can be an easily parsable Error instance.
If an entity has the same discriminator value as one using `TableInheritance` this should be allowed as there is no way for them to conflict. This commit also fixes the discriminatorColumn check to check all the entities it should be checking. Only the parent in an STI setup has the "STI" inheritancePattern, the children just have the "entity-child" tableType. Before two children with the same discriminatorValue would be (incorrectly) allowed as they'd never even get checked. Fixes #2984
…e. (#6942) Previously "id" was hardcoded, thus errors when an entity has a custom primary column name other than "id". Now it fetches the column name from metadata instead.
handle setting values deeply in entities with relations in ColumnMetadata, also check for a virtual relationship column in rawsqlresultstoentitytransformer this allows us to handle a case where `many-to-one` with explicit composite PKs columns were failing to persist a second time- instead of correctly updating the field they would cause an insert to occur leading to a unique PK constraint error
* docs: remove unused variable in many-to-many-relations.md * docs: remove unused variable in one-to-one-relations.md
without postgres v8+ nodejs 14+ will hang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
update master