datamapper/dm-core — Issue #166: InMemoryAdapter and collections
Author: carlhoerberg
Created: 2011-12-04 22:59:42+00:00
State: open

When I append a object to a collection when using the InMemoryAdapter (not sqlite in memory), like this:

order = Order.new
order.lines << OrderLine.new

it throws this:

NoMethodError: undefined method `readonly?' for []:Array
/Users/carl/.rvm/gems/ruby-1.9.3-p0@global/gems/dm-core-1.2.0/lib/dm-core/associations/one_to_many.rb:331:in `inverse_set'
/Users/carl/.rvm/gems/ruby-1.9.3-p0@global/gems/dm-core-1.2.0/lib/dm-core/associations/one_to_many.rb:319:in `resource_added'
/Users/carl/.rvm/gems/ruby-1.9.3-p0@global/gems/dm-core-1.2.0/lib/dm-core/collection.rb:536:in `<<'