User と Capture の 2 つのモデルがあり、Capture は複数のユーザーに関連付けることができます。所有、要求、処理はすべて 3 人の異なるユーザーによって行われます。
User = thinky.createModel 'User',
id: String
displayName: String
email: String
Capture = thinky.createModel 'Capture',
id: String
ownerID: String
processedByID: String
claimedByID: String
created: Date
updated: Date
Capture.belongsTo User.model, 'owner', 'ownerID', 'id'
Capture.belongsTo User.model, 'processedBy', 'processedByID', 'id'
Capture.belongsTo User.model, 'claimedBy', 'claimedByID', 'id'
所有者の関係は機能しますが、processedBy と claimBy の関係を機能させることができません。でクエリを実行して.getJoin()
おり、Thinky はテーブルにセカンダリ インデックスを作成しました (したがって、少なくとも関係については認識しています)。
私は何を間違っていますか?ネストされたオブジェクトをクエリで返すにはどうすればよいですか?