2. creating database and table by hand
#mysql -u username ...
create table F_TESTROW (ID bigint not null auto_increment, VERSION bigint not null, primary key (VERSION, ID))
TestRow testRow = new TestRow();
java.lang.IllegalArgumentException: Can not set java.lang.Long field ru.kctsoft.fenestro.domain.strategy.TestRow.id to org.hibernate.id.IdentifierGeneratorHelper$2
This is kinda frustrating.
184.108.40.206.4. Partial identifier generation
Hibernate supports the automatic generation of some of the identifier properties. Simply use the @GeneratedValue annotation on one or several id properties.
java 6.23 64bit
MySQL most definitely allows AUTO_INCREMENT in composite keys! That is the reason I came here years ago! And it not allows it, as it enforces it when using partitioned tables.
, I probably should have mentioned MySQL with InnoDB. The MyISAM implementation in MySQL does support it unless this has since changed recently.
Chris, I also meant InnoDB. It does allow AUTO_INCREMENT using composite keys, as long as the AUTO_INCREMENT column is the first one of the key (that is the difference to MyISAM).
Same Problem with Hibernate 5.2.16 and SQL Server IDENTITY
Is this a duplicate of HHH-9662?