Joined: Mon Aug 05, 2013 7:21 am Posts: 1
|
Hi can any one help me to solve the problem,
here is my Registration.hbm.xml file
<?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"> <hibernate-mapping> <class name="com.test.form.RegistrationBean" table="RegistrationTable"> <id name="empid" type="int" column="EMPID"> <generator class="assigned" /></id> <property name="empname" column="empname" type="string" length="32" not-null="true"/> <property name="pwd" column="password" type="string" length="32" not-null="true"/> <property name="cpwd" column="cpassword" type="string" length="32" not-null="true"/> <property name="email" column="emailId" type="string" length="32" not-null="true"/> <property name="mobile" column="mobile" type="int" length="10" not-null="true"/> <property name="sbu" column="sbu" type="string" length="32" not-null="true"/> <property name="loc" column="location" type="string" length="32" not-null="true"/> <property name="group" column="group" type="string" length="32" not-null="true"/> <property name="project" column="project" type="string" length="32" not-null="true"/> <property name="mngid" column="managerid" type="int" length="32" not-null="true"/> <property name="mngname" column="managername" type="string" length="32" not-null="true"/> <property name="mngmailid" column="manageremail" type="string" length="32" not-null="true"/> </class> </hibernate-mapping>
And Hibernate.cfg.xml <session-factory> <property name="hbm2ddl.auto">update</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.url">jdbc:mysql://localhost/cmc</property> <property name="connection.username">root</property> <property name="connection.password">root</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="show_sql">true</property> <mapping resource="Purchase.hbm.xml"></mapping> <mapping resource="Registration.hbm.xml"></mapping> </session-factory>
|
|