Posted By

arunpjohny on 11/21/10


Tagged

Hibernate jpa jpa-hibernate


Versions (?)

JPA Annotated id field in Hibernate


 / Published in: Java
 

URL: http://forum.springsource.org/showthread.php?t=45036

Creating a annotated id field using Hibernate and JPA

  1. @Id
  2. @GeneratedValue(generator = "table_name_cid_gen")
  3. @GenericGenerator(name = "table_name_cid_gen", strategy = "sequence", parameters = {
  4. @Parameter(name = "sequence", value = "table_name_cid_seq"),
  5. @Parameter(name = "unsaved-value", value = "0") })
  6. @Column(name = "cid")
  7. private int id;

Report this snippet  

You need to login to post a comment.