I am using the built hibernate 2.1.2, mysql 4, j2se1.4
I have a mapping that use.
Code:
<component
name="super"
class="com.Superclass"
>
<property
name="value"
type="java.lang.String"
update="true"
insert="true"
column="value"
not-null="true"
/>
</component>
Test 1. (use a instance of the Superclass.)
Code:
...
Superclass super = new Superclass();
super.setValue("1");
...
theobject.setSuper(super);
...
session.save(theobject);
Test 2. (use a instance of the Subclass of Superclass.)
Code:
...
Superclass super = new Subclass();
super.setValue("1");
...
theobject.setSuper(super);
...
session.save(theobject);
Result:
Test 1 ok.
Test 2 failed. null id in entry (don't flush the Session after an exception occurs)
Is this a bug?