Java 休眠结果集

Java 休眠结果集,java,sql,oracle,hibernate,Java,Sql,Oracle,Hibernate,我有一个名为AsyncFcmNotification的表,该表在时间戳列上进行了分区。 当我想要执行这个查询时 do { try (HibernateSession session = SessionManager.openSession()) { //noinspection unchecked List<AsyncFcmNotification> asyncFcmNotifications = session.createQuery(&qu

我有一个名为AsyncFcmNotification的表,该表在时间戳列上进行了分区。 当我想要执行这个查询时

do {
    try (HibernateSession session = SessionManager.openSession()) {
        //noinspection unchecked
        List<AsyncFcmNotification> asyncFcmNotifications = session.createQuery("from AsyncFcmNotification where sent = false")
                .setFirstResult(offset)
                .setMaxResults(count)
                .list();
        updateUnsendNotif(asyncFcmNotifications, session);
        offset += 100;
    }
    logger.info(offset + " notif has updated");
} while (offset < asyncFcmNotificationsCount);
do{
试试(HibernateSession session=SessionManager.openSession()){
//未检查

列表

是否可以将堆栈跟踪添加为文本。是否在第一次迭代后或循环开始时出现此错误。是否同时使用Hibernate会话,因为不支持此操作。