Hi,

I wonder how I could restrict what values are inserted into a table
using @Column(precision=5, scale=2). When does it matter?

I'm using OpenJPA 0.9.7-SNAPSHOT with Derby and with the following:

   @Column(precision = 5, scale = 2)
   public double getPensja() {
       return pensja;
   }

OpenJPA executes the following CREATE

2969  derbyPU  TRACE  [main] openjpa.jdbc.SQL - <t 11533424, conn
18662247> executing stmnt 23119024 CREATE TABLE Osoba (numer BIGINT
NOT NULL, dzienImienin TIMESTAMP, dzienUrodzin
TIMESTAMP, imie VARCHAR(255), kraj VARCHAR(255), nazwisko
VARCHAR(255), wersja INTEGER, pensja DOUBLE, tytul VARCHAR(255),
PRIMARY KEY (numer))

How could I restrict the precision and scale of the pensja field? Is
the columnDefinition attribute of @Column the last resort? When is the
others used? What databases are supported?

Jacek

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

Reply via email to