Hibernate version: 3.0
Name and version of the database you are using: Oracle 9i
Hi,
we are developing a web application that use an Oracle database with roles. The UPDATE permissions are granted on a single-field basis and the Hibernate session use a JDBC connection opened with the same username/password pair entered in the login page. This is not good, I know, but we cannot avoid it: the database is shared with another application that uses the roles.
Based on the user logged in, the web application allows changing only a subset of attributes in a persistent object, but when we try to execute
Code:
session.update(obj)
we noticed that the generated SQL statement contains
all the fields in the object, and not only the modified ones. This results in a
insufficent privilege exception throwed by Oracle DB if the user does not have sufficient rights for updating some fields in the destination table.
Is it possible to instruct Hibernate to update only the modified attributes in an object without making different mapping files for the same table?
Thanks in advance for any help.
Pietro Pizzo