
How to map Java Objects with Database tables?

First write Java domain objects ie. beans with setter and getter methods. Then map java class to table and database columns to Java class variables in hbm.xml file.
<hibernate-mapping>
<class name="com.user.User" table="user">
<property column="NAME" length="50" name="uName" not-null="true" type="java.lang.String"/>
<property column="PASSWORD" length="25"
name="uPwd" not-null="true" type="java.lang.String"/>
</class>
</hibernate-mapping>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.