I have a question about how Hibernate uses reflection to check all the getters and setters in methods that have references to other classes. For instance, I have a getter that has this line:
return this.policy.getName
The problem is that when hibernate checks the method right at the beginning of the run, it hasn't yet instantiated the Policy class which is required for the reference, and it gets a null pointer. I was under the assumption that Hibernate would check that the necessary getters/setters are there in all the classes but that it wouldn't actually go through the lines of code in each method.
Is there any way to turn this off so that it doesn't process any code until it is actually trying to persist?
Thanks for any help!
|