我正在处理左连接查询,但我没有得到预期的结果。我一遍又一遍地搜索,但无法找到导致此问题的原因。当我执行以下代码时,它返回 LEFT INNER JOIN 的结果(仅左侧的记录与右侧的项目匹配)。我试图指定 LEFT OUTER 没有成功。我错过了一些简单的东西吗?
var records = ORMExecuteQuery("SELECT new map(inst.id AS installationId,
inst AS installation,
uaa.id AS id,
uaa.permission AS permission,
uaa.app AS app)
FROM Installation AS inst,
LEFT JOIN inst.userApplicationAccesses AS uaa
WITH uaa.user.userId = ?", [Arguments.userId]);