CREATE TABLE `user` (
`userNo` int(10) NOT NULL auto_increment,
`userId` varchar(10) NOT NULL default '',
`name` varchar(25) NOT NULL default '',
`password` varchar(25) NOT NULL default '',
`email` varchar(50) default NULL,
`sex` int(5) default NULL,
`province` varchar(20) default NULL,
`city` varchar(25) default NULL,
`userType` int(10) default '0',
`phone` varchar(20) default NULL,
`mobilePhone` varchar(20) default NULL,
`
mailTrue` int(5) default '0',
PRIMARY KEY (`userNo`)
) TYPE=MyISAM;
我这样写为什么不对?
代码:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<!-- hiberante.PersonModel root -->
<class name="com.guagua.db.User" table="user">
<!--
<id name="userNo" type="long" column="userNo"/>
-->
<id name="userNo" column="userNo">
<generator class="hilo.long"/>
</id>
<property name="email" column="email" type="string"/>
<property name="name" column="name" type="string"/>
<property name="userId" column="userId" type="string"/>
<property name="province" column="province" type="string"/>
<property name="city" column="city" type="string"/>
<property name="sex" column="sex" type="Integer"/>
<property name="password" column="password" type="string"/>
<property name="phone" column="phone" type="string"/>
<property name="mailTrue" column="mailTrue" type="Integer"/>
<property name="userType" column="userType" type="Integer"/>
<property name="mobilePhone" column="mobilePhone" type="string"/>
</class>
</hibernate-mapping>
--转自