Comments (1)
Right, they will not be updated, because (by design) this library does not run before/after hooks, and in fact skips the entire save pipeline in ActiveRecord. (This allows simple inserts to be blazing fast.) If you need counter cache columns to be updated, you'll need to do it yourself, keeping track of what's being inserted, and who the parent objects are, and running SQL statements to update those columns.
If you can come up with a way to automate that without adding overhead for other inserts, I'd be willing to consider a pull request.
from bulk_insert.
Related Issues (20)
- Support for psql ON CONFLICT HOT 4
- Support PostgreSQL 9.5 ON CONFLICT when using ignore: true flag HOT 2
- Bulk Insert Concurrency HOT 3
- Error when default column names are different HOT 2
- Not null contraint but PARAM exists HOT 2
- Support PostgreSQL 9.5 ON CONFLICT DO UPDATE HOT 1
- NoMethodError: undefined method 'result_sets' for nil:NilClass HOT 3
- Why the ID column is being removed from default columns HOT 2
- Result returned from INSERT is nil HOT 9
- Abstract database-specific statements HOT 7
- Falsey column defaults not used HOT 1
- Deprecate the lib since Rails 6.x HOT 2
- Update duplicates option currently updates all columns which may not be desirable
- Drop support for Ruby < 2.4
- CI: fix ruby 2.7 build HOT 1
- Before/After create callbacks HOT 1
- bulk_insert does not return a worker object HOT 4
- bulk_insert version 1.8.1 doesn't play nice with activerecord and mysql2 HOT 2
- before_create not working, Is there any solution?
- Incorrect default value inserted for JSON column types
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulk_insert.