I have a model with jsonb column and I use the pg_json extension. Here is
the problem:
> model.update(x: { a: 1 })
> model.x
=> {:a=>1}
> model.previous_changes
=> {:x=>[{"a"=>1}, {:a=>1}]}
> model.reload.x
=> {"a"=>1}
So Sequel is converting the symbols into strings when saving data to jsonb
column, but the model attribute value still contains symbols until I reload
the model. This also makes previous_changes method to provide wrong results.
Maybe Sequel should update the attribute value after doing conversions?
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/608fa7eb-49d5-4fa0-b06a-7355767b86b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.