Hello!
Ich am working on an application that uses Hibernate with a JDBC connection on Websphere Application Server.
The Application is mainly for displaying Data written to a DB2 on AS400 by a 3rd Party Application.
I need to be 100% sure, that my App is absolutely uncapable of modifying Data on the database.
Now at first i thought, that simply not giving the Database Objects any save() or update() methods would do the trick, but then i came across a little problem:
I hava a method that looks something like this:
Code:
public String getSomeProperty(){
if(this.someProperty.equalsIgnorecase("foo") return "bar";
return this.someProperty
}
calling this method causes Hibernate to run an UPDATE on the database, writing "bar" where there was "foo" before in the row corresponding to the object used.
I could of course use update="false" in all property mappings for all objects to avoid this on the base, but I was wondering if there was a way to avoid manipulation of data on a even lower level. Unfortunately I can not change the permissions that the useraccount of the application has to the database, so I need to restrict access on application level.
Is there any way to make hibernate uncapable of inserting and updating?
IF I'd use update="false", would it _quarantee_ that no updates are ever possible to that property?