2014-04-26 2 views
0

매핑 파일에서 foreign key을 어떻게 지정할 수 있습니까? 다음 매핑 파일에서 id은 외래 키입니다. 어떻게 지정할 수 있습니까?매핑 파일에서 외래 키 지정

<hibernate-mapping> 

    <class name="org.suhail.pojo.Scheduled" table="scheduled"> 
     <id name="sid" column="sid" type="integer"> 
      <generator class="increment" /> 
     </id> 
     <property name="id" column="id" type="integer" /> 
     <property name="sdate" column="sdate" type="date"/> 
     <property name="stime" column="stime" type="time" /> 
     <property name="tweet" column="tweet" type="string" /> 
    </class> 

</hibernate-mapping> 

답변

0

일대 다, 다 대일 또는 다 대다와 같은 외래 관계를 지정하는 방법은 여러 가지가 있습니다.

link을 통해 연결에 대해 더 잘 이해할 수 있습니다.