-->
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: any body can explain me the below mapping doc.
PostPosted: Wed Jan 28, 2009 6:23 am 
Newbie

Joined: Wed Jan 28, 2009 6:14 am
Posts: 2
Hi All,
i am novice to hibernate.i came through one strange mapping file .can any one explain me about below mentioned red portion of mapping file.



<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="org.springframework.prospring.ticket.domain.Seat" table="Seat">

<cache usage="read-only"/>

<id name="id" type="long">
<column name="id"/>
<generator class="identity"/>
</id>

<property name="name" type="string">
<column name="name"/>
</property>

<many-to-one name="leftSide"
column="left_Seat_id"
cascade="none"
outer-join="false"
foreign-key="fk_left_Seat"
not-null="false"/>

<many-to-one name="rightSide"
column="right_Seat_id"
cascade="none"
outer-join="false"
foreign-key="fk_right_Seat"
not-null="false"/>


</class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2009 7:10 am 
Newbie

Joined: Wed Jan 28, 2009 7:02 am
Posts: 1
The mappings are basically two many to one relationship mappings from seat table to leftside and rightside tables.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 28, 2009 2:03 pm 
Newbie

Joined: Wed Jan 28, 2009 6:14 am
Posts: 2
Hi ,
tanx for ur reply. actually i downloaded application named Boxoffice source code from from Appress website.In that i didnt find any classes with names leftside and right side.
My doubt is even in mapping file also they didnt mention class attribute attribute of< many- to- one> element. know. So , how can hibernate can detect the leftside and rightside tables.


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.