3
Files required: ---------------- Customer.java customer.hbm.xml HClient.java hibernate.cfg.xml customer_table <hibernate-mapping package="com.jlc.hibernate"> <class name="Customer" table="customer_table "> <id name="cid" column="cid" type="int"> <generator class="increment"/> </id> <property name="cname" column="cname" type="string"/> <property name="email"/> package com.jlc.hibernate; public class Customer { private int cid; private String cname; private String email; private long phone; private String location; public Customer() { } public Customer(String cname, String email, long phone, String location) { this.cname = cname; this.email = email; this.phone = phone; this.location = location; <hibernate-configuration> <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost/raman</property> <property name="connection.username">root</property> <property name="connection.password">rajiv</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="show_sql">true</property> <mapping resource="com/jlc/hibernate/customer.hbm.xml"/> Customer.java customer.hbm.xml HIBERNATE 4

02_2ND Package Com

  • Upload
    phani

  • View
    213

  • Download
    0

Embed Size (px)

DESCRIPTION

hib prg

Citation preview

Files required: ---------------- Customer.java customer.hbm.xml HClient.java hibernate.cfg.xml customer_table