Well, the only way Hibernate does an insert is if you create an instance of your class and it not have an id value.
Not entirely true. If the class has its ID generation as 'assigned', then a user can assign an ID to an instance of a class, and ask Hibernate to save it.
So where in your application code are you creating an instance of a read-only class and not loading it from the database?
I am not worried about my code, I am worried about other developers' doing that. My API throws OperationNotSupportedException, if someone attempts to invoke the 'save()' method (provided in the api as one of CRUD operations).
However, I want to prevent any malicious attempts of one not using the api and writing his own code.
The project I am working on is a distribute jar file, which is going to be used among many applications. Possibly across multiple divisions, so I want to make sure that no one can insert in a table where he shouldn't.