Hi Thomas,

I knew you were going to say that :-) The trouble is, when I had a class with
field type Float (ie object reference, not primitive), and a DB table
(postgres) with column type FLOAT, my application crashed during a query
because it complained about trying to assign a Double (object reference) to a
Float variable (actually it was a reflection exception, illegal argument
flavour). It worked OK for insert obviously, but for retrieval the result is
just the wrong type! Everything went through OK when I made the change. Maybe
everything works OK if you stick to primitives in your application, and maybe
somewhere along the route from DB to application code the Double object
returned from JdbcAccess.getObjectFromColumn gets converted to the float
primitive. All I can say is that it didn't work for the above scenario.

Cheers,

Chris

Mahler Thomas wrote:

> Hi Chris,
>
> This is not a bug, but works a specified by JDBC. As you can see
> in http://jakarta.apache.org/ojb/jdbc-types.html
> Jdbc "REAL" maps to Java "float" and Jdbc "FLOAT" maps to Java "double".
>
> cheers,
> Thomas


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to