question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to force just update/insert

See original GitHub issue

Issue type:

[x] question [ ] bug report [ ] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [ ] mssql [x] mysql / mariadb [ ] oracle [ ] postgres [ ] cockroachdb [ ] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[ ] latest [ ] @next [ ] 0.x.x (or put your version here)

I have a routine where I perform various loop inserts and updates. It is too heavy due to entity’s .save () performing a select on dependencies after insert / update.

Would you have any parameters to send that would run .save () without select later? Its that my entity will be outdated, but it would get faster.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
meueventocommented, Jan 15, 2020

they also execute select after insert

1reaction
ochanje210commented, Jan 28, 2020

having the same issue regarding performance…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Insert into a MySQL table or update if exists - Stack Overflow
Let's say the unique key is ID , and in my Database, there is a row with ID = 1 . In that...
Read more >
Insert, Updates, Deletes — SQLAlchemy 2.0 Documentation
INSERT, UPDATE and DELETE statements build on a hierarchy starting with UpdateBase . The Insert and Update constructs build on the ...
Read more >
How to UPSERT (INSERT or UPDATE) rows with MERGE in ...
Often when loading data you want to add new rows and change the existing ones. So you need " update if exists, insert...
Read more >
4. Inserting, Updating, Deleting - SQL Cookbook [Book] - O'Reilly
Solution. Create a view on the table exposing only those columns you wish to expose. Then force all inserts to go through that...
Read more >
If Your Trigger Uses UPDATE(), It's Probably Broken.
Users AFTER INSERT, UPDATE AS BEGIN /* If they moved locations, ... Personally, I vomit in my mouth just a little anytime I'm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found