我有两个看起来像这样的模型
class Stage
include DataMapper::Resource
property :id, Serial
belongs_to :staff
end
class Staff
include DataMapper::Resource
property :id, String, :key => true
property :full_name, String
property :email, String
has n, :stages
end
我正在尝试查找分配了特定工作人员的所有阶段。我试过了 @stages = Stage.all(Stage.Staff => 'TM')
我究竟做错了什么?