I have a simple method that just does two lines and tries to return all objects in an oracle database table:
DetachedCriteria criteria = DetachedCriteria.forClass(Object.class);
return (Collection)getHibernateTemplate().findByCriteria(criteria);
However, I got an "ORA-01031: insufficient privileges" error. When I checked the logs for the show_sql, I found this:
Hibernate: select this_.NAME as NAME8_0_, from PL_VW this_ where ID=?
Hibernate: update PL_VW set NAME=? where ID=?
Hibernate: update PL_VW set NAME=? where ID=?
Hibernate: update PL_VW set NAME=? where ID=?
Hibernate: update PL_VW set NAME=? where ID=?
Hibernate: update PL_VW set NAME=? where ID=?
...
Why does findByCriteria select an ID and do multiple updates? Must update access be given for all tables that are hooked to hibernate? I do not wish the tables be updated!
Or is something wrong with the code?
Thanks in advance.