Charles, I've faced similar problem recently. AFAIR the reason is that DataMapper does not recognize the change of hash under Json property. After several attempts I came up with workaround:
o.data[:key1][:key2] += 1 # o.save # doesn't work data = o.data o.data = nil o.save o.data = data o.save 2013-07-26 3:05 GMT+07:00 Charles Monteiro <[email protected]>: > hi, > > I have a model property of type Json, said property is set to a hash of a > hash, apparently updates the to the inner hash are not being picked up by > DM. In a related question if I wanted to persist a hash, I guess type > Object would be the default? are there any limits to the the level of > nesting of an object ? > > thanks > > -Charles > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" 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 http://groups.google.com/group/datamapper. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "DataMapper" 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 http://groups.google.com/group/datamapper. For more options, visit https://groups.google.com/d/optout.
