openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Float primary key?
Date Wed, 11 Apr 2007 23:55:13 GMT
On Apr 11, 2007, at 7:28 AM, Kevin Sutter wrote:

> Okay, I looked at the spec a bit closer and it looks like we need  
> to allow
> for floats as primary keys:
>
> "The primary key (or field or property of a composite primary key)  
> should be
> one of the following types:
> any Java primitive type; any primitive wrapper type; java.lang.String;
> java.util.Date;
> java.sql.Date. In general, however, approximate numeric types (e.g.,
> floating point types) should
> never be used in primary keys."
>
> Although the spec clearly recommends against the use of floating  
> points,
> floats are a primitive type (or the Float wrapper) and need to be  
> allowed.
> With no special "AllowStupidApproximatePrimaryKeys" flag.  :-)
>
> Am I trying to read too much into the spec or Dain's request?  This  
> seems to
> be something that we need to support.

That's all I needed.

Thanks,

-dain

Mime
View raw message