@Override
    public JDOQuery<T> clone(PersistenceManager persistenceManager) {
        JDOQuery<T> query = new JDOQuery<T>(persistenceManager, getTemplates(),
                getMetadata().clone(), isDetach());
        query.fetchGroups.addAll(fetchGroups);
        query.maxFetchDepth = maxFetchDepth;
        return query;
    }
Clone the state of this query to a new {@link JDOQuery} instance with the given {@link PersistenceManager}

@param persistenceManager PersistenceManager instance to use
@return cloned query
querydsl-jdo/src/main/java/com/querydsl/jdo/JDOQuery.java