I'm executing my maven build and it throws this exception:
Last cause: Wrong column type in x.clients for column type. Found: tinyint, expected: integer
I'm mapping like this:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
And I'm creating the column using InnoDB like this: id int NOT NULL UNIQUE AUTO_INCREMENT
Shouldn't this be ok? Why is it saying that he is finding tinyint?
I know this question is (really!) old, but:
TINYINT represents 8-bit values. It's mapped to byte/Byte. It has a minimum value of -128 and a maximum value of 127 (inclusive) in both cases.
SMALLINT represents 16-bit values. It's mapped to short/Short.
INTEGER represents 32-bit values. It's mapped to int/Integer.
BIGINT represents 64-bit values. It's mapped to long/Long.
So, you can't map a tinyint using an Integer; you must use a Byte.
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html http://dev.mysql.com/doc/refman/5.7/en/integer-types.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With