|
First, this is technically not a CROSS JOIN. It is what ANSI SQL terms a table specification. This query has 2 such table specifications:
-
Student s
-
Question q LEFT JOIN s.studentAnswerList AS sa
Neither ANSI SQL (that I can find) nor JPA make it clear how join restrictions should work across table specifications in terms of precedence.
Second, as far as votes and "affecting a lot of queries".. I am not sure that is true. I seriously doubt that many people write queries with join restrictions spanning "table specifications" this way.
The first thing I'd like is to nail down what ANSI SQL expects for this. If anyone has pointers to somewhere this is explained, that would be a great start.
|