One additional note: I have two databases containing the same schema (one 
for integration tests, the other for development). Could that be an issue?

Am Montag, 7. November 2016 15:50:26 UTC+1 schrieb Lukas Eder:
>
> Hi Jens,
>
> Hmm, interesting, that looks correct to me then. I'm afraid I cannot be of 
> any further help right now as I cannot reproduce this and the data produced 
> by your MySQL instance also looks correct.
>
> If you're willing to debug this, there are two interesting pointers where 
> stuff might go wrong:
>
> 1. At the collection of primary key columns:
>
> https://github.com/jOOQ/jOOQ/blob/version-3.8.6/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLDatabase.java#L105
>
> 2. Where the code is generated:
>
> https://github.com/jOOQ/jOOQ/blob/version-3.8.6/jOOQ-codegen/src/main/java/org/jooq/util/JavaGenerator.java#L1047
>
> Let me know if you need any additional info.
> Lukas
>
> 2016-11-07 15:40 GMT+01:00 jklingsporn <[email protected] <javascript:>
> >:
>
>> # TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, NON_UNIQUE, INDEX_SCHEMA, 
>> INDEX_NAME, SEQ_IN_INDEX, COLUMN_NAME, COLLATION, CARDINALITY, SUB_PART, 
>> PACKED, NULLABLE, INDEX_TYPE, COMMENT, INDEX_COMMENT
>> def, test, config_preset_track_part, 0, test, PRIMARY, 1, trackId, A, 1, 
>> , , , BTREE, , 
>> def, test, config_preset_track_part, 0, test, PRIMARY, 2, trackPartIndex, 
>> A, 1, , , , BTREE, , 
>> def, test, config_preset_track_part, 0, test, PRIMARY, 3, 
>> checkPointIndex, A, 1, , , , BTREE, , 
>>
>>
>> Am Montag, 7. November 2016 14:18:07 UTC+1 schrieb Lukas Eder:
>>>
>>> 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] <javascript:>.
>> 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