I want to have an infinitive primary key and that is BigInteger
.
https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-type-conversions.html
BIGINT[(M)] [UNSIGNED] BIGINT [UNSIGNED] java.lang.Long, if UNSIGNED java.math.BigInteger
So I created my entity
public class Alarm {
// ID
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private BigInteger id;
And when I create the tables, I get the following error.
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table alarm (id decimal(19,2) not null auto_increment, frequencyp0p1p2 integer not null, frequencyp3p7p8 integer not null, frequencyp4 integer not null, frequencyp6p5 integer not null, port_description varchar(255), primary key (id)) engine=MyISAM" via JDBC Statement
Caused by: java.sql.SQLSyntaxErrorException: Incorrect column specifier for column 'id'
So what have gone wrong here?