-->
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.  [ 2 posts ] 
Author Message
 Post subject: null pointer exception
PostPosted: Thu Mar 18, 2010 2:47 am 
Beginner
Beginner

Joined: Fri Feb 26, 2010 8:23 am
Posts: 29
please help me i have to finish my task

i need help from u it is very urgent.

sorry for disturbing you this is the last i have to do.

once again i send the code i am using unidirectional foreign key mapping association

in that i am trying left outer join query

first i send the query

select emp.firstname,Insurance.InsuranceName,Insurance.InvestmentAmount FROM simple.Contact emp left outer join simple.Insurance Insurance where emp.insid = Insurance.insid;

it is working in mysql but it is not working in hibernate

i am using hibernate3 and mysql 5.5 version and eclipse ide.


Top
 Profile  
 
 Post subject: Re: null pointer exception
PostPosted: Thu Mar 18, 2010 3:34 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
it is working in mysql but it is not working in hibernate


Try try to use
Code:
session.createSQLQuery("select emp.firstname,Insurance.InsuranceName,Insurance.InvestmentAmount FROM simple.Contact emp left outer join simple.Insurance Insurance where emp.insid = Insurance.insid");


instead to

Code:
session.createQuery("select emp.firstname,Insurance.InsuranceName,Insurance.InvestmentAmount FROM simple.Contact emp left outer join simple.Insurance Insurance where emp.insid = Insurance.insid");


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

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.