Ripple & an attribute named 'key'

Mat Ellis mat at tecnh.com
Sat Feb 12 20:00:26 EST 2011


Why do these behave differently in Ripple?

# Leaves key field blank
property :key, Integer, :presence => true, :default => 1234

# Populates key2 field with 1234
property :key2, Integer, :presence => true, :default => 1234

We'd like to use the key field as a standard (like the 'id' field is the default in ActiveRecord). Is this a bad idea and if so why?

M.






More information about the riak-users mailing list