Re: [Rails-core] getting AR to do postgres jsbonb atomic updates

2018-03-05 Thread Matt Jones
> On Mar 3, 2018, at 3:47 PM, Jonathan Rochkind wrote: > > It is now easy to store a hash serialized as jsonb in posgres. It is even > pretty easy with store_accessor to make individual keys in the hash look like > separate attributes. > > But when AR decides the jsonb column needs to be up

[Rails-core] getting AR to do postgres jsbonb atomic updates

2018-03-03 Thread Jonathan Rochkind
It is now easy to store a hash serialized as jsonb in posgres. It is even pretty easy with store_accessor to make individual keys in the hash look like separate attributes. But when AR decides the jsonb column needs to be updated, it will send the entire hash as an update value. If you only