Re: Persisting attribute using "new" Java time Instant in MySQL


Page bloom
 
Edited

That was enlightening: I hadn't appreciated the two levels of types: JDBC types and MySQL types and that the mappings between them are not a simple one-to-one. Given that the type names are identical I assumed that TIMESTAMP (JDBC) would be mapped to TIMESTAMP (in MySQL)  - silly me ;)

I got specific with the sql-type and now it's working:

        <field name="created">
                <column jdbc-type="TIMESTAMP" sql-type="TIMESTAMP"/>
        </field>
 

Join main@datanucleus.groups.io to automatically receive all group messages.