Join GitHub today
Projection of SQL query onto JPA entities and aliases #540
Projection of SQL query onto JPA entities relies on alias naming and there's not a word in the reference about it.
In the documentation there's this example code:
It did not occur to me that this naming convention was necessary and I have gone through the entire process of coding, frustration and debugging to discover it.
If this behaviour is really best we can have (I believe it to be quite counterintuitive, as QueryDSL mostly handles aliases and paths not relaying on any names) maybe it should be documented accordingly, like:
I'd prefer to keep the original code example and add some documentation.
Mixing table and entity based Querydsl paths is what makes this example a bit tricky. And paths are unified by name at the serialization level.
I am not sure if this is counter-intuitive and I am not sure if there are good alternatives.