jpa, risks of using an illegal named query?
问题 I made a NamedQuery that works but I have multiple error markers in eclipse. Now my query might not be legal, an answer of so (see comments) told me it wasn't possible to do what I intended to do in jpa. So, since I managed to do it anyway and I don't really have a clue why it works: my question is what are the underlying risks of using this : query = "SELECT t FROM Thethread t LEFT JOIN FETCH t.threadVotes tv ON tv.user1=:currentUser ORDER BY t.datePosted DESC" Under on: JOIN FETCH