• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to use object identity in my own way ,that is ,i will create unique based on some calculation

 
jacob deiter
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use object identity in my own way ,that is ,i will create unique based on some calculation,How it can be done in Hibernate?
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to implement the org.hibernate.id.IdentifierGenerator. You can take a look at IncrementGenerator, SequenceGenerator, etc source code as a reference.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends..

the thread makes me wondering about the advantages of using object identity in our own way..
could you explain a bit of that advantages?..

Thanks in advance..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic