Hibernate 다 중 맵
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.softceo.hibernate.dto.Project" table="PROJECT" schema="SCOTT">
<id name="proid" type="java.lang.Integer">
<column name="PROID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<property name="proname" type="java.lang.String">
<column name="PRONAME" length="20" not-null="true" />
</property>
<property name="prodescription" type="java.lang.String">
<column name="PRODESCRIPTION" length="200" not-null="true" />
</property>
<set name="emplorees" table="R_TMP_PROJ" schema="SCOTT" cascade="save-update">
<key>
<column name="R_PROJ_ID" precision="22" scale="0" not-null="true" />
</key>
<many-to-many entity-name="com.softceo.hibernate.dto.Emploree">
<column name="R_EMP_ID" precision="22" scale="0" not-null="true" />
</many-to-many>
</set>
</class>
</hibernate-mapping>
다른 설정 은:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.softceo.hibernate.dto.Project" table="PROJECT" schema="SCOTT">
<id name="proid" type="java.math.BigDecimal">
<column name="PROID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<property name="proname" type="java.lang.String">
<column name="PRONAME" length="20" not-null="true" />
</property>
<property name="prodescription" type="java.lang.String">
<column name="PRODESCRIPTION" length="200" not-null="true" />
</property>
<set name="RTmpProjs" inverse="true" cascade="save-update">
<key>
<column name="R_PROJ_ID" precision="22" scale="0" not-null="true" />
</key>
<one-to-many class="com.softceo.hibernate.dto.RTmpProj" />
</set>
</class>
</hibernate-mapping>
이 설정 은 새로운 실체 맵 을 추가 한 것 입 니 다.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.softceo.hibernate.dto.RTmpProj" table="R_TMP_PROJ" schema="SCOTT">
<composite-id>
<key-many-to-one name="emploree" class="com.softceo.hibernate.dto.Emploree">
<column name="R_EMP_ID" precision="22" scale="0" />
</key-many-to-one>
<key-many-to-one name="project" class="com.softceo.hibernate.dto.Project">
<column name="R_PROJ_ID" precision="22" scale="0" />
</key-many-to-one>
</composite-id>
</class>
</hibernate-mapping>
구체 적 인 코드 는 첨부 파일 참조!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Is Eclipse IDE dying?In 2014 the Eclipse IDE is the leading development environment for Java with a market share of approximately 65%. but ac...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.