diff --git a/lib/sdb/active_sdb.rb b/lib/sdb/active_sdb.rb index 9b5d922..a8ee146 100755 --- a/lib/sdb/active_sdb.rb +++ b/lib/sdb/active_sdb.rb @@ -711,7 +711,7 @@ def domain # def [](attribute) raw = @attributes[attribute.to_s] - self.class.column?(attribute) ? self.class.deserialize(attribute, raw.first) : raw + self.class.column?(attribute) && raw ? self.class.deserialize(attribute, raw.first) : raw end # Updates the attribute identified by +attribute+ with the specified +values+. @@ -955,7 +955,7 @@ def method_missing(method_sym, *args) setter = method_name[-1,1] == '=' method_name.chop! if setter - if @attributes.has_key? method_name + if @attributes.has_key?(method_name) || self.class.column?(method_name) setter ? self[method_name] = args.first : self[method_name] else super