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

Self-referential Many to Many

If a model is described as:


class Topic
  include DataMapper::Resource 

  property :somestring,          String,    :length => 255
  property :topic_id,       Integer

  belongs_to :topic

  has n, :topics, :through => DataMapper::Resource

  is :list, :scope => [:topic_id]

end

The migration created a @ table in the database that only has one row – @

Created by smoofles - 2008-12-20 21:04:45 UTC

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

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

  • 写回答

5条回答 默认 最新

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

    [project:id#20609 not-tagged:"0.10.0" milestone:id#51895 bulk edit command]

    by Dan Kubb (dkubb)

    评论

报告相同问题?