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 > -----Urspr�ngliche Nachricht----- > Von: Chris Lewington [mailto:clewing@;ebi.ac.uk] > Gesendet: Dienstag, 5. November 2002 12:54 > An: [EMAIL PROTECTED] > Betreff: Bug In JdbcAccess.getObjectFromColumn, case FLOAT > > > Hi all, > > Came across a little bug the other day in the above method - > previously > it got a Double and returned a Double object, which is a bit of a > problem if your client method is expecting a Float > object....Obvious fix > is below: > > *was *: > > case Types.FLOAT : > { > double val = rs.getDouble(columnId); > if (!rs.wasNull()) > result = new Double(val); > break; > } > > *should be..* > case Types.FLOAT : > { > float val = rs.getFloat(columnId); > if (!rs.wasNull()) > result = new Float(val); > break; > } > > > Cheers, > > Chris > > > -- > To unsubscribe, e-mail: > <mailto:ojb-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:ojb-user-help@;jakarta.apache.org> > > -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
