0

I used the count to count the rows that are updated. when I run the following code in my program. count becomes 9 though only one record is updated in the database (oracle 11)

Query updateMyQuery = em.createNativeQuery("Query");
        updateMyQuery.setParameter("empNo", empNo); 
        updateMyQuery.setParameter("date", date);
        updateMyQuery.setParameter("flag", flag );
        count = updateMyQuery.executeUpdate();

Query is working I checked in the database.

Thanks

Raja
  • 43
  • 3
  • *I tried to count the number of queries that are updated...* You mean the number of rows? Either way, there's not enough info to identify the problem. Please provide a [mcve]. – shmosel Jun 06 '18 at 19:13
  • yes, I mean the number of rows updated. – Raja Jun 06 '18 at 19:19
  • 2
    Please [turn on Hibernate SQL logging/trace](https://stackoverflow.com/questions/2536829/hibernate-show-real-sql), run the statement, pick generated SQL together with bind values from the log and append them to the question. – krokodilko Jun 06 '18 at 20:49

0 Answers0