class Task
include DataMapper::Resource
has 1, :list, :through => Resource
end
class List
include DataMapper::Resource
has n, :tasks, :through => Resource
end
목록에는 많은 작업이 있습니다. id = 1 인 작업이 있다고 가정합니다.DataMapper => 1 대 다수 필터
이 작업이있는 목록을 찾으려면 어떻게해야합니까?
나는 시도했다 : List.first (: tasks => task)하지만 항상 nil을 반환한다.
감사합니다.