-->
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: one-to-one Mapping unable to get the foreign key child table
PostPosted: Wed Feb 28, 2007 3:50 am 
Newbie

Joined: Wed Feb 28, 2007 3:37 am
Posts: 3
Location: India
Hello friends
Presently iam working on a small project iam getting an problem in the database. when iam using an one-to-one mapping. in the child table iam unable to get the foreign key column and value. can any one kindly help me in this issue plz.
i have taken two POJO venue and venue address. i have mapped these two table as one-to-one
the code is for venue table.

<hibernate-mapping>
<class name="com.conferenceManagement.src.Conf_Venue" table="Conf_Venue_Sridhar">
<id name="venue_Id" column="venue_Id" >
<generator class="assigned"/>
</id>
<property name="venue_Name" column="venue_Name" />
<property name="venue_Phone" column="venue_Phone" />
<property name="venue_Fax" column="venue_Fax" />
<one-to-one name="conf_Venue_Addr" cascade="all-delete-orphan" property-ref="venue_Address_Id"/>
</class>
</hibernate-mapping>


other one:venue_address.

<hibernate-mapping>
<class name="com.conferenceManagement.src.Conf_Venue_Addr" table="Conf_Venue_Addr_Sridhar">
<id name="venue_Address_Id" column="venue_Address_Id" >
<generator class="assigned"/>
</id>
<property name="venue_Address_Street" column="venue_Address_Street"/>
<property name="venue_Address_City" column="venue_Address_City"/>
<property name="venue_Address_State" column="venue_Address_State"/>
<property name="venue_Address_Zipcode" column="venue_Address_Zipcode"/>
<one-to-one name="conf_Venue" constrained="true" cascade="all-delete-orphan" />
</class>
</hibernate-mapping>
[/b]


iam unable to get the venue_address_id in the venue table.
looking for a favourable response soon.

thanks & Regards
Sridhar


Top
 Profile  
 
 Post subject: Re: one-to-one Mapping unable to get the foreign key child t
PostPosted: Tue Mar 20, 2007 8:12 am 
Newbie

Joined: Wed Feb 28, 2007 3:37 am
Posts: 3
Location: India
sridharmuddasani wrote:
Hello friends
Presently iam working on a small project iam getting an problem in the database. when iam using an one-to-one mapping. in the child table iam unable to get the foreign key column and value. can any one kindly help me in this issue plz.
i have taken two POJO venue and venue address. i have mapped these two table as one-to-one
the code is for venue table.

<hibernate-mapping>
<class name="com.conferenceManagement.src.Conf_Venue" table="Conf_Venue_Sridhar">
<id name="venue_Id" column="venue_Id" >
<generator class="assigned"/>
</id>
<property name="venue_Name" column="venue_Name" />
<property name="venue_Phone" column="venue_Phone" />
<property name="venue_Fax" column="venue_Fax" />
<one-to-one name="conf_Venue_Addr" cascade="all-delete-orphan" property-ref="venue_Address_Id"/>
</class>
</hibernate-mapping>


other one:venue_address.

<hibernate-mapping>
<class name="com.conferenceManagement.src.Conf_Venue_Addr" table="Conf_Venue_Addr_Sridhar">
<id name="venue_Address_Id" column="venue_Address_Id" >
<generator class="assigned"/>
</id>
<property name="venue_Address_Street" column="venue_Address_Street"/>
<property name="venue_Address_City" column="venue_Address_City"/>
<property name="venue_Address_State" column="venue_Address_State"/>
<property name="venue_Address_Zipcode" column="venue_Address_Zipcode"/>
<one-to-one name="conf_Venue" constrained="true" cascade="all-delete-orphan" />
</class>
</hibernate-mapping>
[/b]


iam unable to get the venue_address_id in the venue table.

thanks & Regards
Sridhar

_________________
M.Sridhar Reddy


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.