Schema Import Java data types for Oracle CLOB and Timestamp data types

classic Classic list List threaded Threaded
5 messages Options
diopek diopek
Reply | Threaded
Open this post in threaded view
|

Schema Import Java data types for Oracle CLOB and Timestamp data types

This post has NOT been accepted by the mailing list yet.
When I use schema-import utility generated POJO class has Object type for corresponding Oracle CLOB and Timestamp data types. Should I manually override these Object data type in generated POJOs or should I use some casting on the client to get the right data type, Please advise what is the best practice handle such data types (CLOB, Timestamp).
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Schema Import Java data types for Oracle CLOB and Timestamp data types

Hi!

Yes you could manually override almost everything in generated POJOs.
But it is strange that Timestamp is not detected correctly.
Could you post here a sample CREATE TABLE statement that I could use for debug?

Or it will be better if you open issue in Ignite JIRA https://issues.apache.org/jira/browse/IGNITE
And attach DDL script to it.

Also about CLOB, what type are you expected to get?


diopek wrote
When I use schema-import utility generated POJO class has Object type for corresponding Oracle CLOB and Timestamp data types. Should I manually override these Object data type in generated POJOs or should I use some casting on the client to get the right data type, Please advise what is the best practice handle such data types (CLOB, Timestamp).
diopek diopek
Reply | Threaded
Open this post in threaded view
|

Re: Schema Import Java data types for Oracle CLOB and Timestamp data types

This post has NOT been accepted by the mailing list yet.
Below is sample DB script,
CREATE PRODUCT_DEFINITION
(
  ID            NUMBER,
  PROD_NAME          VARCHAR2(128 BYTE),
  PROD_DESC          VARCHAR2(500 BYTE),
  ELEMENT_FILTER         CLOB,
  CREATED_BY          VARCHAR2(20 BYTE),
  CREATE_TS           TIMESTAMP(6),
  ...
)
ELEMENT_FILTER (CLOB) and CREATE_TS (TIMESTAMP(6)) are generated as Java Object type
I would expect CLOB to be mapped to String and Timestamp to be mapped to Java Calendar or Date data types.
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: Schema Import Java data types for Oracle CLOB and Timestamp data types

Thanks, I created issue: https://issues.apache.org/jira/browse/IGNITE-1263
You can track it.
I hope we could fix this in a couple of days.
Vasiliy Sisko Vasiliy Sisko
Reply | Threaded
Open this post in threaded view
|

Re: Schema Import Java data types for Oracle CLOB and Timestamp data types

Issue has been fixed. It will be available at next release or next nightly build.

https://github.com/apache/incubator-ignite/commit/e9a0d06ffa104c0e54e0e95b0af229f7648d22d1