private void copyJoins(From<?, ?> from, From<?, ?> to) {
for (Join<?, ?> join : from.getJoins()) {
Join<?, ?> toJoin = to.join(join.getAttribute().getName(), join.getJoinType());
toJoin.alias(getAlias(join));
copyJoins(join, toJoin);
}
for (Fetch<?, ?> fetch : from.getFetches()) {
Fetch<?, ?> toFetch = to.fetch(fetch.getAttribute().getName());
copyFetches(fetch, toFetch);
}
}
------解决思路----------------------
From<?, ?> from, From<?, ?> to 采用的Java为什么这样写,有什么好处详见这里