Left join entity is never null
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
ソースファイルもテストも指定されていません。まず、issue にある 2 つのクエリ形式を SQLProvider v1.1.93 に対して再現し、leftOuterJoin、DefaultIfEmpty()、および報告されているデフォルト値のエンティティに焦点を当ててください。サポートされている構文と、エンティティが存在しない場合に予想される動作を文書化またはテストできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I am trying to left join "sheets" entity but I can't get it to work properly.
The documentation says that leftOuterJoin is not supported, but I see examples on stackoverflow of people saying this works.
For me it does not.
query {
for e in ctx.Dbo.TimeEntries do
join t in ctx.Dbo.ProjectTasks on (e.TaskId = t.Id)
leftOuterJoin sheet in ctx.Dbo.DrawingLogSheets on (e.SheetId = Some sheet.Id) into sheetResults
for s in sheetResults.DefaultIfEmpty() do
where (e.Email = Some email && e.Date = dateOnly)
select (toTimeEntry(e, t, s))
}
This fails with an error.
I also tried this approach:
query {
for e in ctx.Dbo.TimeEntries do
join t in ctx.Dbo.ProjectTasks on (e.TaskId = t.Id)
join s in (!!) ctx.Dbo.DrawingLogSheets on (e.SheetId = Some s.Id)
where (e.Email = Some email && e.Date = dateOnly)
select (toTimeEntry(e, t, s))
}
This kind of works, but sheet is never null when it is missing; instead, it has all its values defaulted. For example, its ID field is a new guid (all zeros), and its string values are all empty string. I suppose I could check for defaulted guid, but this just feels like something is not right.
To Reproduce
Expected behavior
In the first example (leftOuterJoin), I just want to verify whether this syntax is supposed to be supported or not.
In the second example (!!), I would expect the sheet entity to be null when no sheet is joined, but instead it is instantiated with all default values.
Screenshots
Desktop (please complete the following information):
- Windows
- SQLProvider is v1.1.93
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- 主要言語
- F#
- スター
- 627
- フォーク
- 147
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/SQLProvider のほかの issue
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
fsprojects/SQLProvider#872 · コメント 2 件 ·
-
Repo Assist? オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
fsprojects/SQLProvider#870 · コメント 1 件 ·
-
postgresql
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
fsprojects/SQLProvider#869 · コメント 2 件 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
fsprojects/SQLProvider#868 · コメント 2 件 ·
-
sql server
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fsprojects/SQLProvider#851 · コメント 1 件 ·
fsprojects/SQLProvider の issue をすべて見る
似ている issue
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
community-scripts/ProxmoxVE#17396 · コメント 1 件 ·
-
bug possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
AOSSIE-Org/PictoPy#1553 · コメント 4 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BasedHardware/omi#15274 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100