hibernate3与orcle9i中的表映射问题请教
hibernate3与orcle9i中的表映射问题请教
现oracle9i建了一张表名为USERLIST
字段如下:
-- Create table
create table USERLIST
(
ID NUMBER(20) not null,
USERNAME VARCHAR2(200),
USERPWD VARCHAR2(200)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table USERLIST
add constraint XWTID primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
----------------------------
Userlist.hbm.xml如下
<?xml version= "1.0 "?>
<!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 - Hibernate Tools
-->
<hibernate-mapping>
<class name= "com.newstong.domain.Userlist " table= "USERLIST " schema= "DTSC ">
<id name= "id " type= "java.lang.Long ">
<column name= "ID " precision= "20 " scale= "0 " />
<generator class= "increment " />
</id>
<property name= "username " type= "java.lang.String ">
<column name= "USERNAME " length= "200 " />
</property>
<property name= "userpwd " type= "java.lang.String ">
<column name= "USERPWD " length= "200 " />
</property>
</class>
</hibernate-mapping>