Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Hstore and JSON fields are not supported with store

The use of `store` on Hstore fields (for instance) is not needed
because serialization aimed to interact with Ruby objects and not
with provided field types
  • Loading branch information...
commit 1478ebf66c158bd214ed807622ec941cad4e3dee 1 parent 97ad84e
@robin850 robin850 authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/lib/active_record/store.rb
View
4 activerecord/lib/active_record/store.rb
@@ -15,6 +15,10 @@ module ActiveRecord
# You can set custom coder to encode/decode your serialized attributes to/from different formats.
# JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+.
#
+ # With PostgreSQL, the +store+ feature is not supported for field types such as Hstore
+ # or JSON because it would add an extra layer of serialization and this is not needed.
+ # Rely on +store_accessor+ instead.
+ #
# Examples:
#
# class User < ActiveRecord::Base
Please sign in to comment.
Something went wrong with that request. Please try again.