大量数据访问时,用JPA 对象映射关系会出错?
昨天在做一JPA调试时出了些莫名其妙的错。
@Overridepublic void delete(long userId, String[] phoneList){List list = new ArrayList();for (String phone : phoneList){list.add(phone);}String hql = "Delete From Black where userid=? and phone In (:collection)";Query q = em.createQuery(hql);q.setParameter(1, userId);q.setParameter("collection", list);q.executeUpdate();}