81,094
社区成员
发帖
与我相关
我的任务
分享
//假如你图片表的类名是:Images
String hql = "from Images ";
Session session = HibernateSessionFactory.getSession();
Query query = session.createQuery(hql);
List list = query.list();
for(Images ima : list){
System.out.println(ima.getJpg()); //取得图片
System.out.println(ima.getProductid().name); //取得产品信息
}
//算不算一张图片对应一个产品!!!