-->
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: birdirectional association doubt
PostPosted: Fri May 11, 2007 8:26 am 
Newbie

Joined: Fri May 11, 2007 8:12 am
Posts: 1
Dear ALl,

I am a newbie. I am struck with a very basic doubt in Hibernate,



Let say we have two entities – Customer and Account. Customer can have multiple accounts. Also, in two entities, we have bidirectional association.



Now, given customerId, I can fetch customer and then accounts.



Now, because association is bidirectional, we should be able to fetch account and then its customer, if accountId is given. Somehow, I am getting strange error in Hibernate, when I say that –

accountDao().load(accountId). I don’t see any issue in this.



Error is –

01:01:44,590 ERROR [LogInterceptor] EJBException in method: public abstract org.infy.enr.infybank.vo.AccountVO org.infy.enr.infybank.service.ejb.UserService.getAccountDetails(java.lang.Long), causedBy:

java.lang.NullPointerException


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.