}
//second, add version/optimistic locking object attributes into the fetch group if applied.
OptimisticLockingPolicy lockingPolicy = getDescriptor().getOptimisticLockingPolicy();
if (query.shouldMaintainCache() && (lockingPolicy != null)) {
lockingPolicy.prepareFetchGroupForReadQuery(query.getFetchGroup(), query);
}
//thrid, prepare all fetch group attributes
Iterator attrIter = attributes.iterator();
while (attrIter.hasNext()) {