1
1 class Person
2
3 class Link
4
5 include DataMapper::Resource
6
7 storage_names[:default] = 'people_links'
8
9 # the person who is following someone
10 belongs_to :follower, 'Person', :key => true
11
12 # the person who is followed by someone
13 belongs_to :followed, 'Person', :key => true
14
15 end
16
17 include DataMapper::Resource
18
19 property :id, Serial
20 property :name, String, :required => true
21 ...
それはあなたが戻って取得したり、ある結果に影響を持っていますそれはちょうど別の記法または形式ですか?事前に
おかげで、ルーファス
お返事ありがとうございました! – rufus