• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

idevtity vs native in id tag of .hbm.xml file

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi bloggers

i am having one question that

what is the difference between the

identity and native, generator class in id tag

in hibernate mapping file
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"identity" is a datatype peculuar to a few RDBMS implementations that can be used to generate a primary key. Telling Hibernate to use that directly limits the databases your code will work against. "native" delegates to one of a few native primary key generation strategies provided by the database. this might include identity, or it might be sequence of hilo.
 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks in deed

paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic