openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <...@cndavies.com>
Subject RE: Known issues - Floats and doubles may lose precision when stored.
Date Thu, 07 Jan 2010 11:24:36 GMT
I'm no expert on this but I find OpenJPA 1.2.1 works just fine on ProgresSQL
when I use specific notation 

	@Column(columnDefinition="DOUBLE UNSIGNED",precision=10,scale=6,
nullable=false)
	private double rate = 0.00;

If I don't use the column definition it's a mess, same issue I find on MySQL
5.x and OpenJPA 1.2.1

My 2c!

Chris


-----Original Message-----
From: Riaan [mailto:riaan.potgieter@corefreight.com] 
Sent: Thursday, 7 January 2010 7:41 PM
To: users@openjpa.apache.org
Subject: Known issues - Floats and doubles may lose precision when stored.


Hi,

I am new to OpenJPA, but not new to the concept of persistence layers.
(I have used Hibernate and TopLink in the past, but only for small
proof-of-concept applications.)

I have recently started an OpenJPA proof-of-concept application, with the
goal of gaining experience with OpenJPA and the DataCache and QueryCache
features of OpenJPA in particular.

So far, I am very impressed with OpenJPA, and I think it is a high-quality,
feature-rich, open source product.

Anyway, here are my two questions:

1.) Under the heading "Known issues with PostgreSQL", it says:
"Floats and doubles may lose precision when stored."

(http://openjpa.apache.org/builds/latest/docs/manual/dbsupport_postgresql.ht
ml#dbsupport_postgresql_issues)

This sounds a bit scary, and it worries me.

Question: Is this still a problem with OpenJPA 1.2.1? 
If yes, in what version of OpenJPA will this be resolved?


2.) The same issue is listed under "Known issues with SQL Server":
"Floats and doubles may lose precision when stored."

(http://openjpa.apache.org/builds/latest/docs/manual/dbsupport_sqlserver.htm
l#dbsupport_sqlserver_issues)

Again, is this still a problem with OpenJPA 1.2.1? 
If yes, in what version of OpenJPA will this be resolved?


My sincere thanks go to the OpenJPA team, for building this open source
product!

At the moment, I am using the following software stack for my
proof-of-concept application:

  Persistence: OpenJPA version 1.2.1 
  Database: Postgresql 8.3 
  OS: Ubuntu 9.04
  Java: JDK 1.6
  IDE: Netbeans 6.8
  App Server: OpenEJB 3.1.2

Regards
Riaan
South Africa
-- 
View this message in context:
http://n2.nabble.com/Known-issues-Floats-and-doubles-may-lose-precision-when
-stored-tp4265454p4265454.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message