Hi/lo algorithm in Hibernate

By: Dorris Emailed: 1728 times Printed: 2331 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

The hilo and seqhilo generators provide two alternate implementations of the hi/lo algorithm. The first implementation requires a "special" database table to hold the next available "hi" value. Where supported, the second uses an Oracle-style sequence.

<id name="id" type="long" column="cat_id">

<generator class="hilo">

<param name="table">hi_value</param>

<param name="column">next_value</param>

<param name="max_lo">100</param>

</generator>

</id>

<id name="id" type="long" column="cat_id">

<generator class="seqhilo">

<param name="sequence">hi_value</param>

<param name="max_lo">100</param>

</generator>

</id>

Unfortunately, you cannot use hilo when supplying your own Connection to Hibernate. When Hibernate uses an application server datasource to obtain connections enlisted with JTA, you must configure the hibernate.transaction.manager_lookup_class.


Hibernate Home | All Hibernate Tutorials | Latest Hibernate Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Dorris
sum of all digits in a given number using Shell Script
sh -x and sh -v in Linux
case..esac..in Linux Shell Script
while loop in Linux Shell Script
Nested for loop in Linux Shell Script
for loop in Linux Shell Script
Multilevel if-then-else in Linux Shell Script
Nested if-else-fi in Linux Shell Script
if...else...fi in Linux Shell Script
test command or [ expr ] in Linux Shell Script
if condition in Linux Shell Script
Download Linux. Which linux and where?
Formula in Hibernate
Primary keys assigned by triggers in Hibernate
Assigned identifiers in Hibernate

More Tutorials in Hibernate
Fetching strategies in Hibernate
equals() and hashCode() in Hibernate
Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate
EntityNameResolvers in Hibernate
Hi/lo algorithm in Hibernate
Identity columns and sequences in Hibernate
Assigned identifiers in Hibernate
Primary keys assigned by triggers in Hibernate
Formula in Hibernate
Step by Step Hibernate - Your First Hibernate Application
A sample Hibernate Web Application using Servlets
Some Basic APIs in Hibernate
Contextual sessions in Hibernate
Programmatic configuration in Hibernate
SessionFactory in Hibernate

More Latest News
Most Viewed Articles (in Hibernate )
Hibernate Vs. JDBC ( A comparison)
A sample Hibernate Web Application using Servlets
Fetching strategies in Hibernate
Creating Connection Pool for JDBC Connections in Hibernate
Step by Step Hibernate - Your First Hibernate Application
Hibernate Configuration Properties
Download Hibernate latest version
Programmatic configuration in Hibernate
Hibernate JDBC and Connection Properties
Identity columns and sequences in Hibernate
Delta Electronics Chairman Bruce Cheng Endows NCKU Build Y.S. Sun Green Building Research Center
Some Basic APIs in Hibernate
Contextual sessions in Hibernate
SessionFactory in Hibernate
Hibernate Cache Properties
Most Emailed Articles (in Hibernate)
Download Hibernate latest version
Formula in Hibernate
Contextual sessions in Hibernate
Hibernate Cache Properties
Hibernate Transaction Properties
Hibernate JDBC and Connection Properties
Fetching strategies in Hibernate
equals() and hashCode() in Hibernate
Tuplizers (org.hibernate.tuple.Tuplizer) in Hibernate
Identity columns and sequences in Hibernate
Delta Electronics Chairman Bruce Cheng Endows NCKU Build Y.S. Sun Green Building Research Center
Hibernate Vs. JDBC ( A comparison)
Step by Step Hibernate - Your First Hibernate Application
Types of inheritence models in Hibernate
What is component mapping in hibernate?