* so it should refer only to the attributes that cannot be altered without re-preparing the query.
* If the query is a clone and the original has been already prepared
* this method will be called to set a (transient and therefore set to null) usesResultSetAccessOptimization attribute.
*/
public boolean supportsResultSetAccessOptimizationOnPrepare() {
DatabaseCall call = getCall();
return ((call != null) && call.getReturnsResultSet()) && // must return ResultSet
(!hasJoining() || !this.joinedAttributeManager.isToManyJoin()) &&
(!this.descriptor.hasInheritance() ||
!this.descriptor.getInheritancePolicy().hasClassExtractor() && // ClassExtractor requires the whole row
(shouldOuterJoinSubclasses() || !this.descriptor.getInheritancePolicy().requiresMultipleTableSubclassRead() || this.descriptor.getInheritancePolicy().hasView())) && // don't know how to handle select class type call - ResultSet optimization breaks it.
(this.batchFetchPolicy == null || !this.batchFetchPolicy.isIN()); // batchFetchPolicy.isIN() requires all rows up front - can't support it