There are several problems with the current approach on fetch joins:
1. There is no way to determine in the parser already if a join is fetch or not, this makes it much harder to implement things like @OrderBy or @OrderColumn
2. A DQL like "SELECT u, g.name FROM User u JOIN u.group g" currently tries to partially load the group object instead of just returning g.name as scalar. This is very unintuiative.
Solution, change the EBNF too:
Question would be how to specify partial object selects.
Romans idea was something like:
However my take is this would again put information into the select clause that might be interesting elsewhere, so
That way we could add both $isFetchJoin and $isPartial flags to the AST/Join Node plus an additional $partialFields array.
|Status||Open [ 1 ]||In Progress [ 3 ]|
|Status||In Progress [ 3 ]||Closed [ 6 ]|
|Resolution||Fixed [ 1 ]|
|Workflow||jira [ 10891 ]||jira-feedback [ 15548 ]|
|Workflow||jira-feedback [ 15548 ]||jira-feedback2 [ 17412 ]|
|Workflow||jira-feedback2 [ 17412 ]||jira-feedback3 [ 19669 ]|