[
https://issues.apache.org/jira/browse/OPENJPA-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15575879#comment-15575879
]
Mark Struberg commented on OPENJPA-2671:
----------------------------------------
Indeed, if I add the lines above to your test then it works fine. Here is the
final persistence.xml I did use in the test:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="testHsqldbDouble">
<class>testHsqldbDouble.TestEntity</class>
<properties>
<property name="openjpa.jdbc.DBDictionary"
value="(DoubleTypeName=DOUBLE)"/>
</properties>
</persistence-unit>
</persistence>
{code}
> Wrong type mapping for double in HSQLDB
> ---------------------------------------
>
> Key: OPENJPA-2671
> URL: https://issues.apache.org/jira/browse/OPENJPA-2671
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.4.1
> Reporter: Andreas Borg
> Attachments: testHsqldbDouble.zip
>
>
> Currently, Java type {{double}} is mapped to {{NUMERIC}} for HSQLDB:
> {code:title=HSQLDictionary.java, line 82|borderStyle=solid}
> doubleTypeName = "NUMERIC";
> {code}
> (see
> https://fisheye6.atlassian.com/browse/~tag=2.4.1/openjpa/tags/2.4.1/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java?hb=true).
> This seems wrong to me, as HSQLDB's {{NUMERIC}} is not a binary floating
> point type, but represents exact decimal numbers and maps to Java type
> {{BigDecimal}} (see HSQL documentation:
> http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html#sgc_numeric_types). The
> corresponding HSQL type for {{double}} is, according to this manual,
> {{REAL}}, {{FLOAT}} or {{DOUBLE}} (all being equivalent).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)