| @Vlad,
This is not an issue. The JOIN is expected for multiple reasons:
1. At first, the association fetch strategy was not declared, so it was EAGER by default.
You never provided the entities. The entities which I took from this GitHub repository were using the default EAGER fetching anyway.
Your examples do not include anything about Entity Graphs, so I don't understand why did you mention those when your issue is about projecting entities with multiselect.
Even with the explicit lazy in the annotation, the behaviour is the same. What is the point of using this argument 3 times? Is this mistake one of the argument of closing the ticket?
Entity Graphs are for entity queries, not DTO projections.
It looks like that JPA specification on this subject is largely subject to interpretation, I don't see from where you get such certainty about what it doesn't tell? Maybe I am not in the secrets of the ORM gods like you ?  There is nothing intuitive about the current behavior. Just my 2 cents. |