Hi all,
I've mapped my entity identifier property in order to use the default identifier generator like below:
Code:
@Entity
@Table(name="Article")
public class Article implements Serializable
{
@Id
@GeneratedValue
@Column(name="codeArticle",insertable=false)
private Long codeArticle;
private String auteur;
public Article()
{
}
...
}
The corresponding datebase column type is identity. And with sybase, this column is automatically generated.
But when I try to persist an instance, I don't know why Hibernate is adding the codeArticle column in the generated sql statement.
Here is the code that is generated by Hibernate:
Quote:
Hibernate: insert into Article (codeArticle, auteur, codeCategorie, dateEnreg, codeSupport, titre) values (null, ?, ?, ?, ?, ?)
16:24:52,171 ERROR [JDBCExceptionReporter] The column codeArticle in table Article does not allow null values.
Can someone tells me how to say to Hibernate no to put the codeArticle column in the insert statement ?
thanks in advance.
Meissa