Hello Please find my Users Table structure and the generated mapping file below.
I am giving you the create script for the Table
Users Table:Code:
CREATE TABLE [dbo].[Users](
[userid] [int] IDENTITY(1,1) NOT NULL,
[firstname] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[lastname] [varchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[password] [varchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[phone] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[email] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[createUser] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[createDate] [datetime] NOT NULL,
[updateUser] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[updateDate] [datetime] NULL,
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
(
[userid] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
Users.hbm.xmlCode:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Jun 6, 2009 7:40:18 PM by Hibernate Tools 3.2.4.GA -->
<hibernate-mapping>
<class name="Users" table="Users" schema="dbo" catalog="suiteaccess">
<id name="userid" type="int">
<column name="userid" />
<generator class="assigned" />
</id>
<property name="firstname" type="string">
<column name="firstname" length="30" not-null="true" />
</property>
<property name="lastname" type="string">
<column name="lastname" length="30" not-null="true" />
</property>
<property name="password" type="string">
<column name="password" length="8" not-null="true" />
</property>
<property name="phone" type="string">
<column name="phone" length="20" />
</property>
<property name="email" type="string">
<column name="email" length="50" />
</property>
<property name="username" type="string">
<column name="username" length="50" not-null="true" />
</property>
<property name="createUser" type="string">
<column name="createUser" length="50" not-null="true" />
</property>
<property name="createDate" type="timestamp">
<column name="createDate" length="23" not-null="true" />
</property>
<property name="updateUser" type="string">
<column name="updateUser" length="50" />
</property>
<property name="updateDate" type="timestamp">
<column name="updateDate" length="23" />
</property>
</class>
</hibernate-mapping>