Hi
I'm having trouble getting default column values to work via Hibernate. In the database, a column called 'PIDM' is defined as:
Code:
int(9) NOT NULL default '0'
If I use an SQL client (QueryBrowser) to insert a record-and dont provide a value for this column, the default value is used.
Using Hibernate/JPA, if I dont provide a value, I get the following exception:
Code:
Column 'PIDM' cannot be null
I've given the column this columnDefinition but still have the problem
Code:
@Column(columnDefinition="int(9) NOT NULL default '0'")
Can anyone tell me where I am going wrong please?