fix: support multiple row insert on oracle#6927
Conversation
1c3db34 to
a27ef58
Compare
|
Can you explain briefly how this works? Just curious - even a link to the oracle docs would be fine - not sure what features this is using in oracle |
|
@imnotjames You can insert on oracle based on a query. So you can do something like: ìnsert into table1
select ...so what this change does is, create a query with the union of all the values on the array to be inserted, then place them on the insert statement. |
|
Thank you for the context! Makes lots more sense now. I do see notes about it not working well with sequences. As such, can you add a test that uses a primary generated column? |
|
I've already added that @imnotjames |
|
Aha, I had only looked at the second model, didn't see the first one 🙈 I'll try to fully review this as soon as I can. Trying to get through the backlog while keeping up with new PRs. |
|
I've had to add tests with primary generated columns and date columns, etc. |
Thank you |
|
@imnotjames just realized I dind't leave the id null on the tests with primary generated, I might have to fix that. |
a27ef58 to
a54dd22
Compare
change generated insert query to allow inserting an array of objects to oracle fixes: typeorm#2434
a54dd22 to
599d187
Compare
@imnotjames the tests are fixed now. |
|
Good we have oracle tests running on CI now. Probably this can be merged? |
change generated insert query to allow inserting an array of objects to oracle fixes: typeorm#2434
change generated insert query to allow inserting an array of objects to oracle fixes: typeorm#2434
* typeorm-0.2.30: (212 commits) version bump docs: fix javascript usage examples (typeorm#7031) fix: resolve migration for UpdateDateColumn without ON UPDATE clause (typeorm#7057) fix: Error when sorting by an embedded entity while using join and skip/take (typeorm#7082) fix: resolves Postgres sequence identifier length error (typeorm#7115) feat: closure table custom naming (typeorm#7120) feat: relations: Orphaned row action (typeorm#7105) docs: fix invalid code block in "find many options" (typeorm#7268) docs: Embodying the example (typeorm#7116) docs: document withDeleted option (typeorm#7132) fix: return 'null' (instead of 'undefined') on lazy relations that have no results (typeorm#7146) (typeorm#7147) docs: update cascade options (typeorm#7140) docs: add .ts to supported ormconfig formats (typeorm#7139) fix: improve stack traces when using persist executor (typeorm#7218) refactor: remove Oracle multirow insert workaround (since typeorm#6927) (typeorm#7083) feat: add NOWAIT and SKIP LOCKED lock support for MySQL (typeorm#7236) docs: update OneToMany grammar (typeorm#7252) feat: JavaScript file migrations output (typeorm#7253) docs: update Repository.ts (typeorm#7254) chore: update dependency cli-highlight to v2.1.10 (typeorm#7265) ...
change generated insert query to allow inserting an array of objects to oracle
fixes: #2434