Increment with hibernate generator
This is continuation of my previous post.
We discussed with different type of generators for primary keys and we have seen an example with ‘assigned’ previously. We can see ‘generator’ in this post.
RoseIndia says we shouldnt use this in clustered invironment.
Create a table using the following structure.
Let your DTO be like this
package hib;
public class Book {
private long bookID;
private String bookName;
public long getBookID() {
return bookID;
}
public void setBookID(long bookID) {
this.bookID = bookID;
}
public String getBookName() {
… Continue Reading

