clintongormley / Elastic-Model

Use ElasticSearch as a NoSQL database in Perl
9 stars 8 forks source link

has_changed for nested objects! #28

Closed amiri closed 11 years ago

amiri commented 11 years ago

The serializer passes the serialized string as the "array ref" to be inflated! I changed this, perhaps somewhat crudely, but the test makes clear what I mean. It's a pretty important feature, though, I think.

clintongormley commented 11 years ago

Hi @amiri

The problem was a bit different - didn't apply just to nested types. has_changed was comparing any reference as a JSON string, but then trying to inflate the original value from that string, instead of from the original "json-friendly" data structure.

This is now fixed and will be released in the new version. Thanks for reporting it

clint