0
持つ行のみを選択:私のセットアップは、私がTimesheet
を持っているSequelizeが、私はこのクエリを持つ複数のレコード
Time_Sheet_Details.findAll({
include: [
{
model: timesheetNotesSubcon,
required: false,
attributes:["note","file_name", "id", "working_hrs", "timestamp", "has_screenshot", "notes_category", "userid"],
},
{
model: Timesheet,
attributes:["id","leads_id","userid","subcontractors_id"],
where: clientWhere, // Client
include:[
{
model: Lead_Info, attributes:["id","fname","lname","email","hiring_coordinator_id","status"],
where: scWhere, // SC
include:[{
model: adminInfoSchema,
required: false,
attributes:["admin_id","admin_fname", "admin_lname", "admin_email", "signature_contact_nos", "signature_company"],
}]
},
{
model:Personal_Info,attributes:["userid","fname","lname","email"],
}
]
}],
where: {
reference_date: filters.reference_date
},
order:[
["id","DESC"]
],
offset:((page-1)*limit),
limit : limit,
subQuery:false
}).then(function(foundObject){
willFulfillDeferred.resolve(foundObject);
});
はTimesheetDetails
は多くのtimesheetNotesSubcon
を持っています。私はTimesheetDetails
を取り込んで、一緒にtimesheetNotesSubcon
と一緒に行きます。
それは正常に動作しますが、私はのみそうtimesheetNotesSubcon
でのゼロ(0)の結果を持つすべてのTimesheetDetails
がフェッチされません同じかtimesheetNotesSubcon
以上の1つのレコードを持っていtimesheetNotesSubcon
で取得したい場合はどのような。