jeremyevans/sequel — Issue #432: serialization_modification_detection seems broken
Author: esad
Created: 2012-02-01 00:14:14+00:00
State: open

Here's the minimal test case:

require "rubygems"
require "json"
require "sequel"

# connect to an in-memory database
DB = Sequel.sqlite

# create an items table
DB.create_table :items do
primary_key :id
String :data
end

class Item < Sequel::Model
plugin :serialization
plugin :serialization_modification_detection

serialize_attributes :json, :data
end

i = Item.create
i.data = {a:1}
i.save
i.changed_columns # [:data], should be empty?

Shouldn't changed columns at the end be empty, because we just saved the model?