I have a postgresql table in which I have declared a column 'inv_seq' which is declared as 'SERIAL'.
I have a Hibernate bean class to map the table. All the other columns are read properly except this column. here is the declaration in the Hibernate bean class:
....
....
@GeneratedValue(strategy=javax.persistence.GenerationType.AUTO)
@Column(name = "inv_seq")
public Integer getInvoiceSeq() {
return invoiceSeq;
}
public void setInvoiceSeq(Integer invoiceSeq) {
this.invoiceSeq = invoiceSeq;
}
....
.....
Is the declaration correct? I am able to see the serialized numbers generated by the column in the database,but I am not able to access them in the java class.
Please Help.
Thanks, Aditya