在此分离条件中,我想从两个第一列Pool_id和Product_id中获取重复值 ....
Object[] id1={1,2};
DetachedCriteria poolcriteria = DetachedCriteria.forClass(PoolProduct.class, "PoolProduct");
poolcriteria.add(Restrictions.in("PoolProduct.id",id1));
System.out.println("Before list...");
List<PoolProduct> results = poolcriteria.getExecutableCriteria(session).list();
System.out.println("Before loop...");
for (PoolProduct mj1 : results) {
System.out.println("Pool ID..."+mj1.getPoolProductId());
List<Product> poolProd = (List<Product>) mj1.getProduct();
for(Product mi:poolProd){
System.out.println("Product Id..."+mi.getProductId());
System.out.println("Product Deascription..."+mi.getProductDescription());
count++;
}