openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <>
Subject Re: @Column with precision and scale - how does it work?
Date Tue, 10 Apr 2007 21:59:01 GMT
I'm sorry, I misunderstood your question.

I'm afraid I don't know how we determine when to apply the scale and

In this case the value should be ignored, since there's no way to set it on
the column. If the attribute was of type BigDecimal then I think the
precision and scale should apply.

The catch here is that it looks like we're mapping BigDecimal to DOUBLE so
that won't work. I'll have to take a closer look to determine where that
mapping occurs, and what the correct mapping(s) should be.

Would you mind opening a JIRA report for the problem?


On 4/10/07, Jacek Laskowski <> wrote:
> On 4/10/07, Michael Dick <> wrote:
> > I don't think Derby supports specifying the precision on type DOUBLE
> (maybe
> > other datbases do).
> You're right - it doesn't.
> > You should be able to specify the precision through the @Column
> annotation.
> > I believe @Column(columnDefinition="DECIMAL(5,2)") will
> > work.
> DECIMAL is a synonim of NUMERIC and either works well.
> > I'm not sure whether precision=x, scale=y with a type that maps to
> > DECIMAL instead of DOUBLE.
> That's my question how OpenJPA recognizes whether the attributes
> should be used or not. I don't think precision and scale are not used
> at all.
> Jacek
> --
> Jacek Laskowski

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message