Thank you very much for reporting this, Jens. I have registered an issue
for this:
https://github.com/jOOQ/jOOQ/issues/5652

Unfortunately, I cannot yet seem to reproduce this on MySQL 5.7. Could you
perhaps test on your side if this query yields the correct columns?

SELECT *
FROM information_schema.statistics
WHERE index_name = 'PRIMARY'
AND table_name = 'config_preset_track_part'
ORDER BY seq_in_index


That's a simplified version of the one jOOQ runs to fetch primary key
columns...

Cheers,
Lukas

2016-11-07 10:04 GMT+01:00 jklingsporn <[email protected]>:

> Hi,
> I just noticed that the key()-method in my generated record does not
> return the actual primary key of that table but only a key type of Record1
> (and not Record3).
>
>
> I'm using jOOQ 3.8.6 and MySQL 5.6.16.
> Here is the table schema:
>
> CREATE TABLE `config_preset_track_part` (
>  `trackId` int(10) NOT NULL,
>  `configId` int(10) NOT NULL,
>  `trackPartIndex` int(10) NOT NULL,
>  `checkPointIndex` int(10) NOT NULL,
>  PRIMARY KEY (`trackId`,`trackPartIndex`,`checkPointIndex`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
>
>
> Edit: It works fine when I define the primary key columns in order, so this
>
>
> CREATE TABLE `config_preset_track_part` (
> `trackId` int(10) NOT NULL,
> `trackPartIndex` int(10) NOT NULL,
> `checkPointIndex` int(10) NOT NULL,
> `configId` int(10) NOT NULL,
>  PRIMARY KEY (`trackId`,`trackPartIndex`,`checkPointIndex`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
>
> works.
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to