PublicAccess - Ensure correct ordering on join

Ensured the correct order on JOIN for the subsequent mapping on AccessDto and AccessRuleDto.
This commit is contained in:
Colletz
2017-02-28 12:43:49 +01:00
committed by GitHub
parent 15150f9a16
commit 0f32c2d680

View File

@@ -69,7 +69,8 @@ namespace Umbraco.Core.Persistence.Repositories
sql.Select("*")
.From<AccessDto>(SqlSyntax)
.LeftJoin<AccessRuleDto>(SqlSyntax)
.On<AccessDto, AccessRuleDto>(SqlSyntax, left => left.Id, right => right.AccessId);
.On<AccessDto, AccessRuleDto>(SqlSyntax, left => left.Id, right => right.AccessId)
.OrderBy(new string[] { "umbracoAccess.id" });
return sql;
}
@@ -164,4 +165,4 @@ namespace Umbraco.Core.Persistence.Repositories
return entity.Key;
}
}
}
}