/ Published in: Java
Creating a annotated id field using Hibernate and JPA
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
@Id @GeneratedValue(generator = "table_name_cid_gen") @GenericGenerator(name = "table_name_cid_gen", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "table_name_cid_seq"), @Parameter(name = "unsaved-value", value = "0") }) @Column(name = "cid") private int id;
URL: http://forum.springsource.org/showthread.php?t=45036