Generator in Hibernate

Ads

 
 

Share on Google+Share on Google+

samar
Generator in Hibernate
1 Answer(s)      6 years and 6 months ago
Posted in : Hibernate Interview Questions

What is the generator in hibernate?

Ads
View Answers

March 8, 2011 at 6:49 PM


Hi Friends,

Hibernate Generator is used for primary key generation. It generate primary key when new record inserted.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true" default-lazy="true">
<class name="net.roseindia.model.EmployeeInfoModel" table="employeeinfo">
<id name="id" column="id" type="java.lang.Integer">
<generator class="increment" />
</id>
<property name="name" column="name" type="java.lang.String" />
<property name="address" column="address" type="java.lang.String" />
</class>
</hibernate-mapping>

Thanks.......


Ads









Related Tutorials/Questions & Answers:
Generator in Hibernate
Generator in Hibernate  What is the generator in hibernate
Hibernate Generator
This tutorial is helpful in understanding the concept of hibernate generator
Advertisements
hibernate metamodel generator
In this section, you will learn about hibernate metamodel generator
Understanding Hibernate <generator> element
about hibernate <generator> method in detail. Hibernate generator element... are the list of some commonly used generators in hibernate: Generator... Understanding Hibernate <generator> element
Hibernate generator Element
Hibernate <generator> Element In this tutorial you will learn about the hibernate's <generator> element. <generator> is an optional...; type="long" column="Id" > <generator class="
Hibernate generator Element
In this tutorial you will learn about the hibernate's generator element , which is used to auto generate the primary key value
Version of com.clusterra>hibernate-jpa-schema-generator dependency
List of Version of com.clusterra>hibernate-jpa-schema-generator dependency
Version of com.clusterra>clusterra-hibernate-jpa-schema-generator dependency
List of Version of com.clusterra>clusterra-hibernate-jpa-schema-generator dependency
Using Hibernate <generator> to generate id incrementally - Struts
Using Hibernate to generate id incrementally  Hi All, How to increment id using Hibernate ( or if any other) to generate id. I am using...) to the class. Here is the example of generator element from our first application
Maven Dependency hibernate-jpa-schema-generator >> 1.0.10.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.10.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.11.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.11.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.12.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.12.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.13.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.13.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.1.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.1.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.2.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.2.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.3.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.3.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.4.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.4.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.6.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.6.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.7.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.7.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.8.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.8.RELEASE in your project
Maven Dependency hibernate-jpa-schema-generator >> 1.0.9.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> hibernate-jpa-schema-generator version1.0.9.RELEASE in your project
how to use sequence as a generator class in hibernate for ms sql
how to use sequence as a generator class in hibernate for ms sql  Hi... as a generator class for ms sql database. Do we need to create an sequence in mssql prior to use sequence generator class?.If it is mandatory to create an sequence in mssql
Maven Dependency clusterra-hibernate-jpa-schema-generator >> 1.1.0.RELEASE
You should include the dependency code given in this page to add Maven Dependency of com.clusterra >> clusterra-hibernate-jpa-schema-generator version1.1.0.RELEASE in your project
Data Generator
Data Generator Data Generator is free open source script that is designed to create the application, which can be used to generate a large sum of data... JavaScript, PHP and MySQL. Characteristics Data generator is browser
Hibernate
Hibernate  what is the purpose of generator class in hbm file
HIBERNATE
HIBERNATE   What is difference between Jdbc and Hibernate
hibernate
hibernate  what is hibernate listeners
hibernate
hibernate  what is hibernate flow
JNIUS Model Driven Development Generator
JNIUS Model Driven Development Generator       JNIUS Generator is an Eclipse plugin for MDD.......). a mapping file from database : Hibernate mappinf files (*.hbm.xml
hibernate
hibernate  how to uses optional column in hibernate
hibernate
hibernate  please give me the link where i can freely download hibernate software(with dependencies)   Learn hibernate, if you want to learn hibernate, please visit the following link: Hibernate Tutorials