Hibernate version:
3.1.3
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-access="field" default-lazy="true"
package="a.b.c">
<class name="MyAbstractTemplateClass" abstract="true">
<id name = "id" column="id" type="string" length="45" />
<property name="lastModified"
column="last_modified"
type="timestamp"
not-null="true" />
<union-subclass name="MyConcreteClass"
extends="MyAbstractTemplateClass"
table="my_table">
<property name="aperture" column="aperture" type="string" not-null="false"/>
<property name="azimuth" column="azimuth" type="float" not-null="false"/>
<property name="backend" column="backend" type="string" not-null="false"/>
<property name="backtype" column="backtype" type="string" not-null="false"/>
<property name="bii" column="bii" type="float" not-null="false"/>
</union-subclass>
</class>
</hibernate-mapping>
Name and version of the database you are using:
Sybase ASE 12.5
My unit tests, which do nothing more than call getCurrentSession().save(MyConcreteClass) within a transaction, store the data fine, but upon retrieving it, only those fields with a datatype of float (java.lang.Float in MyConcreteClass) come back null when I load the instance of MyConcreteClass. If I look in the database, it's stored fine, and if I rerun the test without purging the data, it runs fine and the Floats have data. Has anyone encountered this weirdness before? Are Floats handled differently?
My Sybase defines the columns just as floats, without any length specified and they're all nullable.
Many thanks,
Dustin
|