empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jan (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Updated] (EMPIREDB-210) Wrong Java Type in Records for BLOB Columns
Date Tue, 26 Aug 2014 09:53:58 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

jan updated EMPIREDB-210:
-------------------------

    Attachment: Record.vm.patch

The getJavaType-method in WriterService.java returns "Byte[].class" for BLOB Columns. "getName()"
of Byte[].class returns "[Ljava.lang.Byte;", "getCanonicalName()" returns java.lang.Byte[].

I attached a patch for Record.vm to call getCanonicalName instead of getName which fixes the
issue for me.

> Wrong Java Type in Records for BLOB Columns
> -------------------------------------------
>
>                 Key: EMPIREDB-210
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-210
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: CodeGenerator
>    Affects Versions: empire-db-2.4.3
>            Reporter: jan
>            Priority: Minor
>         Attachments: Record.vm.patch
>
>
> When using the empire-db-codegen project to reverse engineer an existing database the
data type BLOB is broken. For example the getter in the record for column BLOB_VALUE (Data
Type BLOB) is generated as:
> public [Ljava.lang.Byte; getBlobValue() {
> 	return ([Ljava.lang.Byte;)super.getValue(getTable().BLOB_VALUE);
> }
> "[Ljava.lang.Byte;" is clearly wrong.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message