if (query == null) {
// The properties/query hints and setIsExecutionClone etc. is set
// in the getReadObjectQuery.
query = getReadObjectQuery(descriptor.getJavaClass(), primaryKeyValues, properties);
} else {
query.checkPrepare(session, null);
query = (ReadObjectQuery)query.clone();
// Apply the properties if there are some.
QueryHintsHandler.apply(properties, query, session.getLoader());