openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject BigDecimal, PostgreSQL 8.2 and @Column elements - precision and scale
Date Fri, 20 Apr 2007 08:32:26 GMT
Hi,

I'm getting an illegal SQL exception when working with OpenJPA
0.9.8-incubator-SNAPSHOT and PostgreSQL 8.2.3 with an persistent
attribute defined as follows:

    @Column(precision = 7, scale = 3)
    public BigDecimal getPensja() {
        return pensja;
    }

OpenJPA generates

  pensja DOUBLE PRECISION(7, 3)

for it that makes postgresql unhappy. When I leave DOUBLE PRECISION
alone, the sql statement works fine.

Should it map to DOUBLE PRECISION (inexact) or NUMERIC (exact)?

Where's the mapping done? What class controls how the final sql looks
like? Is this a bug I should report to the jira?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message