title: Hibernate read and update large data
body: <p>I need to read large data from a table and update this.</p>
  <p>What best solution for this?.</p>
  <p>I using stream but it has issue</p>
  <p><code>Caused by: java.sql.SQLException: Streaming result set com.mysql.cj.protocol.a.result.ResultsetRowsStreaming@3ea407e4 is still active.</code></p>
  <p>No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called <code>.close()</code> on any active streaming result sets before attempting more queries.
  My code is  below:</p>
  <pre><code>Stream&lt;UserNotificationDTO&gt; dtoStream = userNotificationRepo.fetchAllUnreadByUserId(userId);
          dtoStream.forEach(userNotifyDTO -&gt; {
              userNotifyDTO.setOpened(true);
              userNotificationRepo.save(userNotifyDTO);
          });
  </code></pre>