Hi,
I'm trying to implement memcached and I seem to be having an issue, I
think its related to DM hence my posting here.  I'm running these
commands in the rails console and getting the preceding errors.

Any suggestions?

#First fetch sets key in cache (successfully)
@p = Rails.cache.fetch('fperson') {Person.first}
@p.name
=> deco10
@p.pets.count
=> 5
#Second fetch gets key from server (successfully)
@p = Rails.cache.fetch('fperson') {Person.first}
@p.name
=> deco10
@p.pets.count
=>
TypeError: can't modify frozen object
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
resource.rb:157:in `key'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
resource.rb:900:in `conditions'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
resource.rb:671:in `query'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
resource.rb:661:in `collection_for_self'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
resource.rb:636:in `collection'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/
associations/one_to_many.rb:94:in `lazy_load'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/resource/
state/persisted.rb:23:in `lazy_load'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/resource/
state/persisted.rb:8:in `get'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/model/
relationship.rb:337:in `pets'

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to