weixin_39782500 2020-11-22 01:58
浏览 0

resources fail to load associations after _dump/_load

Resources with working associations fail to load their associations after they have been dumped/loaded. With an error akin to:

/Library/Ruby/Gems/1.8/gems/dm-core-0.9.9/lib/dm-core/associations/relationship.rb:106:in send': undefined methodanimals_association' for nil:NilClass (NoMethodError)

It would appear (to me) to be an error with the identity map on the repository of the resources after _load (which is an empty hash). This would appear to cause issues with child_key and parent_key lookups. The attached stand-alone script demonstrates the problem (and difference in repository identity_maps).

Created by geemus (Wesley Beary) - 2009-01-06 00:58:55 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/745

该提问来源于开源项目:datamapper/dm-core

  • 写回答

7条回答 默认 最新

  • weixin_39782500 2020-11-22 01:58
    关注

    : I can’t seem to reproduce this with dm-core/next.

    When I run your script it appears to have an error in it, but I don’t know what your intentions are, and rather than assume them I wondered if you could try to reproduce this with dm-core/next and attach a stand-alone script if you can.

    by Dan Kubb (dkubb)

    评论

报告相同问题?