-->
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.  [ 3 posts ] 
Author Message
 Post subject: null pointer exception
PostPosted: Wed Mar 17, 2010 8:32 am 
Beginner
Beginner

Joined: Fri Feb 26, 2010 8:23 am
Posts: 29
please reply to me it is very urgent

i am waiting for u

sorry for the disturbing u

i have to finish my task today itself.


Top
 Profile  
 
 Post subject: Re: null pointer exception
PostPosted: Wed Mar 17, 2010 9:47 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Code:
<hibernate-mapping>
<class name="Contact" table="emp">
<id name="cId" column="c_id" type="int">
<generator class="increment"/>
</id>
<property name="firstName" column ="firstname"/>
<property name="lastName" column ="lastname"/>

<bag name="insurance" inverse="true" cascade="all,delete-orphan" table="Insurance">
<key column="c_id" not-null="true"/>
<one-to-many class="simple.Insurance"/>
</bag>
</class>

<class name="Insurance" table="Insurance">
<id name="insid" column ="InsID" type="int">
<generator class="increment"/>
</id>
<many-to-one name="cId" column="c_id"  class="simple.Contact" foreign-key="cId"/>
</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject: Re: null pointer exception
PostPosted: Thu Mar 18, 2010 12:58 am 
Beginner
Beginner

Joined: Fri Feb 26, 2010 8:23 am
Posts: 29
thank u for ur reply but i still got the same exception could u please point out in the code where i had done the mistake.

it is my humble request to u.

actually key column in the bag means it specifies foreign key.

reply me soon i am waiting for u.

i already send the code to u.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.