[OJB-developers] How to map a float to MySql?
Brought to you by:
thma
From: <ri...@ya...> - 2002-01-22 19:40:23
|
Hi, How do you map a float value to a MySql table field? The OJB documentation says that you should map float values to a REAL = column in the database, but MySql doesn't have that sort of data type. First, I defined the MySql field as FLOAT(4,2). Then I tried to map the float value to a REAL column, in the mapping.xml = file, but OJB expects a double value: [ojb.broker.accesslayer.RsIterator] ERROR: null java.lang.Double at = ojb.broker.accesslayer.RowReaderDefaultImpl.readObjectFrom(RowReaderDefau= ltI mpl.java:77) ... I've tried to map it to a FLOAT column in the mapping.xml file, but I = receive the same exception: OJB is expecting a double. For all these changes, my database field was defined as FLOAT(4,2). = Should I change this? Has anybody mapped a float to a MySql database? Thanks in advance. Ricardo Arguello |