-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Null pointers when reflection calls methods w/ refs
PostPosted: Thu Nov 17, 2005 11:32 am 
Newbie

Joined: Thu Jun 30, 2005 10:35 am
Posts: 13
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.