Lazy loading error in through associations
Reported by Zach Baker | August 11th, 2008 @ 01:22 PM
Under 0.9.3, when attempting to access a Text field in a model through its associated model in a has-and-belongs-to-many structure, an error is raised:
<gems>/extlib-0.9.3/lib/extlib/lazy_array.rb:32:in `replace': can't modify frozen array (TypeError)
from <gems>/extlib-0.9.3/lib/extlib/lazy_array.rb:32:in `replace'
from <gems>/dm-core-0.9.3/lib/dm-core/collection.rb:273:in `replace'
from <gems>/dm-core-0.9.3/lib/dm-core/collection.rb:39:in `reload'
from <gems>/dm-core-0.9.3/lib/dm-core/resource.rb:445:in `reload_attributes'
from <gems>/dm-core-0.9.3/lib/dm-core/resource.rb:588:in `lazy_load'
from <gems>/dm-core-0.9.3/lib/dm-core/property.rb:435:in `send'
from <gems>/dm-core-0.9.3/lib/dm-core/property.rb:435:in `lazy_load'
from <gems>/dm-core-0.9.3/lib/dm-core/property.rb:377:in `get'
from <gems>/dm-core-0.9.3/lib/dm-core/resource.rb:102:in `attribute_get'
from <gems>/dm-core-0.9.3/lib/dm-core/model.rb:378:in `body'
Please see attachment for an example.
Comments and changes to this ticket
-
Dirkjan Bussink August 13th, 2008 @ 01:13 PM
Afaik i already fixed this in the latest edge code. Could you check this?
-

pchm August 14th, 2008 @ 03:55 AM
Dirkjan: I'm affraid it's still broken. I'm using the latest dm-edge.
~ can't modify frozen array - (TypeError) /usr/local/lib/ruby/gems/1.8/gems/extlib-0.9.5/lib/extlib/lazy_array.rb:32:in
replace' /usr/local/lib/ruby/gems/1.8/gems/extlib-0.9.5/lib/extlib/lazy_array.rb:32:inreplace' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/collection.rb:273:inreplace' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/collection.rb:39:inreload' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/resource.rb:448:inreload_attributes' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/resource.rb:594:inlazy_load' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/property.rb:435:insend' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/property.rb:435:inlazy_load' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/property.rb:377:inget' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/resource.rb:102:inattribute_get' /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.4/lib/dm-core/model.rb:393:inglossary' -
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
