hi this is my hibernate.cfg.xml and
<hibernate-configuration>
<session-factory name="session1">
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost:3306/sample</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.current_session_context_class">
thread</property>
<mapping resource="com/test/users/Customer.hbm.xml"/>
</session-factory>
</hibernate-configuration
and this is my customer.hbm.xml
<hibernate-mapping auto-import="true" default-lazy="false">
<class
name="sample.Customer"
table="customer">
<id column="customer_id" name="CustomerId">
<generator class="increment" />
</id>
<property column="discount_code" name="DiscountCode" />
<property column="zip" name="Zip"/>
<property column="name" name="UserName" />
<property column="credit_limit" name="CreditLimit" />
<property column="addressline1" name="AddressLine1"/>
<property column="addressline2" name="AddressLine2" />
<property column="city" name="City" />
<property column="email" name="EmailAddress"/>
<property column="phone" name="Phone"/>
<property column="fax" name="Fax"/>
<property column="state" name="State" />
</class>
</hibernate-mapping>