jmix
jmix copied to clipboard
OffsetDateTime does not work for Oracle
Environment
Jmix version: 2.x
Bug Description
- Wrong
Oracle10Platform.java
has been used inio.jmix.eclipselink.impl.dbms.JmixOraclePlatform
Should beorg.eclipse.persistence.platform.database.oracle.Oracle10Platform
instead oforg.eclipse.persistence.platform.database.Oracle10Platform
Steps To Reproduce
Steps to reproduce:
- Create a project with oracle db and field with type OffsetDateTime.
- Run project, edit entity, set value to this field, save. ER: entity saved without any issues AR: Exception
ConversionException:
Exception Description: The object [oracle.sql.TIMESTAMPTZ@4a924d17], of class [class oracle.sql.TIMESTAMPTZ], from mapping /*...*/ , could not be converted to [class java.time.OffsetDateTime].
Additionally
- Check ojdbc driver version (8 or 11) (studio part)
- Check timezone conversion for our oracle test server.(+1 hour in db after save)
- dig into
org.eclipse.persistence.platform.database.oracle.Oracle10Platform
andorg.eclipse.persistence.platform.database.Oracle10Platform
platform differences - Check other time/date datatypes
- Maybe use a newer platform (11+ ?)