[hibernate-dev] TableGenerator missing "not null"
jcosta at redhat.com
Fri Dec 12 10:34:48 EST 2008
----- "Steve Ebersole" <steve at hibernate.org> escreveu:
> I am surprised that DB2 does not allow nulls and yet forces you to
> specify "not null" since it is totally redundant: PK cannot be null
> DB2 by definition yet it forces user to explicitly specify "not null"
Not only that: they even have a very specific error message about it :-) Look for "SQLSTATE: 42831".
One more reference: http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.cloudscape.doc/rrefsqlj81859.html
"Just as in CREATE TABLE, if the column definition includes a unique or primary key constraint, the column cannot contain null values, so the NOT NULL attribute must also be specified (SQLSTATE 42831)."
> The patch looks fine to me in this case.
Ok, I'll commit it.
And you also won Czech beer or Moravian wine. Make your choice :-)
More information about the hibernate-dev