Break a much gentler FieldDefinition out of FieldOverride. The former *must* be supplied for any computed field; the latter must *only* be supplied for fields that would otherwise reference concrete columns. This lets us be more intelligent about what we expand where. Also bring back the old semi-conservative selection criterion for two-pass cache-happy collection queries; it gets simply too hairy when parts of an object's primary key comes from a separate table.
This commit is contained in:
@@ -35,6 +35,7 @@ import com.samskivert.util.ArrayUtil;
|
||||
import com.samskivert.jdbc.DatabaseLiaison;
|
||||
import com.samskivert.jdbc.JDBCUtil;
|
||||
|
||||
import com.samskivert.jdbc.depot.clause.FieldDefinition;
|
||||
import com.samskivert.jdbc.depot.clause.FieldOverride;
|
||||
import com.samskivert.jdbc.depot.clause.Join;
|
||||
import com.samskivert.jdbc.depot.clause.QueryClause;
|
||||
@@ -102,7 +103,7 @@ public abstract class FindAllQuery<T extends PersistentRecord>
|
||||
// a select subset of query clauses are preserved for the entity query
|
||||
QueryClause[] newClauses = new QueryClause[_clauses.length + 1];
|
||||
for (int ii = 0; ii < _clauses.length; ii ++) {
|
||||
if (_clauses[ii] instanceof Join || _clauses[ii] instanceof FieldOverride) {
|
||||
if (_clauses[ii] instanceof Join || _clauses[ii] instanceof FieldDefinition) {
|
||||
newClauses[jj ++] = _clauses[ii];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user