/** * Returns a DatabaseQuery instance representing the owning * ParseTree. This implementation returns a ReadAllQuery for simple SELECT * queries and a ReportQuery otherwise. */ public DatabaseQuery createDatabaseQuery(ParseTreeContext context) { // TODO: This optimization needs to be revisited because it causes GlassFish issues: 2084 and 2171 // These issues have been solve in GlassFish by always generating a ReportQuery // The same fix has not been made in Oracle TopLink because it disables some advanced JPA Query Hints ObjectLevelReadQuery query; if (isReadAllQuery(context)) { query = new ReadAllQuery(); } else { query = new ReportQuery(); } query.dontUseDistinct(); //gf bug 1395- prevents using distinct unless user specified return query; }
/** * Returns a DatabaseQuery instance representing the owning * ParseTree. This implementation returns a ReadAllQuery for simple SELECT * queries and a ReportQuery otherwise. */ public DatabaseQuery createDatabaseQuery(ParseTreeContext context) { // TODO: This optimization needs to be revisited because it causes GlassFish issues: 2084 and 2171 // These issues have been solve in GlassFish by always generating a ReportQuery // The same fix has not been made in Oracle TopLink because it disables some advanced JPA Query Hints ObjectLevelReadQuery query; if (isReadAllQuery(context)) { query = new ReadAllQuery(); } else { query = new ReportQuery(); } query.dontUseDistinct(); //gf bug 1395- prevents using distinct unless user specified return query; }
/** * Returns a DatabaseQuery instance representing the owning * ParseTree. This implementation returns a ReadAllQuery for simple SELECT * queries and a ReportQuery otherwise. */ public DatabaseQuery createDatabaseQuery(ParseTreeContext context) { // TODO: This optimization needs to be revisited because it causes GlassFish issues: 2084 and 2171 // These issues have been solve in GlassFish by always generating a ReportQuery // The same fix has not been made in Oracle TopLink because it disables some advanced JPA Query Hints ObjectLevelReadQuery query; if (isReadAllQuery(context)) { query = new ReadAllQuery(); } else { query = new ReportQuery(); } query.dontUseDistinct(); //gf bug 1395- prevents using distinct unless user specified return query; }
this.lockingClause = lockingClause; dontUseDistinct();
this.lockingClause = lockingClause; dontUseDistinct();
this.lockingClause = lockingClause; dontUseDistinct();