I think this may be a bug with the hibernate code. If you look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_3grn.asp
The syntax states that precision comes before scale in the create table syntax for numeric types.
This leads me to believe that the syntax:
create table Product (id numeric(19,0) not null, version numeric(19,0) not null, name varchar(255) null, price numeric(19,255) null, image image null, primary key (id))
is wrong, the numeric colums should be switched around :
create table Product (id numeric(0,19) not null, version numeric(0,19) not null, name varchar(255) null, price numeric(255,19) null, image image null, primary key (id))
The first number is the precision. As microsoft says:
"Specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point."
The second number is the scale:
"The default scale is 0; therefore, 0 <= s <= p. Maximum storage sizes vary, based on the precision."
Anyone know how to fix this?