| I have a field marked with... @Basic(fetch = FetchType.LAZY) @Formula("...") ...which works as it should. Adding that field to an EntityGraph for either fetch or load causes an error in the 'sort by' clause of my query which uses that field because the JPA query translator used by the EntityGraph seems unaware of the column, I assume because it's not part of the meta-model at that point. If I leave out the EntityGraph, everything is fine and the column is properly translated into its sql formula in the sort by clause. Further, if the field is accessed, it's acquired lazily properly. But if I attempt to turn off lazy loading for a particular query, to avoid N+1 lazy loading issues (and I either want the field or I will never touch it) using an EntityGraph with either fetch or load semantics, I get the error on query translation. |