光滑3 joinLeft与无行

时间:2015-08-27 13:45:40

标签: scala slick slick-3.0

尝试从2个表中选择数据

用户和任务

希望让所有用户都没有任何任务

尝试了下一个查询

val fq = userQ.joinLeft(taskQ).filter(el => el._2.isEmpty)

从逻辑上讲,它是正确的“选择所有用户点击任务字段为空”

蝙蝠结果为0.我做错了什么?任何建议?

表:

userQ
id------name

taskQ
id-----userId

BR!

1 个答案:

答案 0 :(得分:0)

我看起来你的查询缺少加入的内容:

Private Sub guidelinesList_SelectedIndexChanged(ByVal sender As Object, ByVal e As ListViewCommandEventArgs) Handles guidelinesList.SelectedIndexChanged i = guidelinesList.SelectedIndex End Sub Private Sub guidelinesList_ItemDataCommand(ByVal sender As Object, ByVal e As ListViewCommandEventArgs) Handles guidelinesList.ItemCommand Dim theIdLabel As Label = CType(guidelinesList.Items(i).FindControl("lblId"), Label) guidelinesId = CInt(theIdLabel.Text) If String.Equals(e.CommandName, "bEdit") Then Response.Redirect("../EditFile.aspx?FileId=" & guidelinesId & "&FileType=Guidelines" & "&AppType=Payroll") End If End Sub