Hello!
I am having a problem with the latest Hibernate Version and PostgresQL.
Just a simple thing: Trying to generate with reveng a User Table with
a userid field in it. Everything works fine but the Hibernate Tools, which
I use for generating, do not generate Annotations for the
postgres sequence:
Code:
@Entity
@Table(name = "user", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = "useridhash"))
public class User implements java.io.Serializable {
private int userid;
private Integer clicks;
private String email;
private String password;
private String useridhash;
private String username;
public User() {
}
@Id
@Column(name = "userid", unique = true, nullable = false)
public int getUserid() {
return this.userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
As you can see there is nothing like
Code:
@GeneratedValue(strategy=GenerationType.SEQUENCE)
So how do I get the hibernate tools running corectly with postgres serials?
Thanks for our help!
daniel