主页 > 知识库 > 网络编程 > JSP/Java >

JAVA编程语言程序开发 数据库中2两张表

来源:中国IT实验室 作者:佚名 发表于:2013-01-23 09:19  点击:
数据库中2两张表 一张user表,一张pay表 department的外键在user表中做主键 则:用eclipse的自动翻转工具生成的配置文件如下 ?xml version=1.0 encoding=utf-8? www.2cto.com !DOCTYPE hibernate-mapping PUBLIC -//Hibernate/Hibernate Mapping DTD 3.0//EN
 数据库中2两张表  一张user表,一张pay表
  department的外键在user表中做主键
  则:用eclipse的自动翻转工具生成的配置文件如下
  <?xml version="1.0" encoding="utf-8"?> www.2cto.com
  <!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.ddz.model.User" table="user" catalog="flandlordb">
  <id name="username" type="java.lang.String">
  <column name="username" length="20" />
  <generator class="assigned" />
  </id>
  <property name="password" type="java.lang.String">
  <column name="password" length="20" not-null="true" />
  </property>
  <property name="name" type="java.lang.String">
  <column name="name" length="50" />
  </property>
  <property name="iconPath" type="java.lang.String">
  <column name="icon_path" length="100" />
  </property>
  <property name="sex" type="java.lang.String">
  <column name="sex" length="10" />
  </property>
  <property name="qq" type="java.lang.String">
  <column name="qq" length="16" />
  </property>
  <property name="level" type="java.lang.String">
  <column name="level" length="20" />
  </property>

有帮助
(0)
0%
没帮助
(0)
0%