3 ms·
I agree, ActiveRecord is pretty good. My main gripe with it is that bulk inserts are _still_ not a first class operation, which can easily lead to some horrendo
by WJW 8y ago
I agree, ActiveRecord is pretty good. My main gripe with it is that bulk inserts are _still_ not a first class operation, which can easily lead to some horrendous N+1 queries if you are not careful. There are multiple great gems to retrofit that though.
It is also a bit overzealous in being database agnostic. For example, MySQL allows for LIMIT clauses on UPDATE and DELETE statements, which is super useful for making sure you don't accidentally create super long running transactions because there were many more rows on the other side of that relation than you expected. However, if you want to use that from ActiveRecord you need to drop down to custom SQL, because not all databases support that SQL pattern.