奇怪的Hibernate问题,不能保存,无异常,无insert语句,但是对象UUID已产生。
Abib 2009-01-16 10:29:14 大家帮我看看,给点提示,先谢谢了!
Hibernate version:
3.2.3.ga
Mapping documents:
<hibernate-mapping package="objects">
<class name="OrganizationStructureObject" abstract="true">
<id name="objID">
<generator class="uuid.hex"></generator>
</id>
<property name="clientID" not-null="true"></property>
<property name="name" not-null="true"></property>
<property name="abbreviation" type="string" length="20"></property>
<property name="description"></property>
<property name="typeCode" not-null="true"></property>
<union-subclass name="OrganizationUnit" table="TA_ORG_ORG_UNIT">
</union-subclass>
<union-subclass name="Person" table="TA_ORG_PERSON">
<property name="userID"></property>
</union-subclass>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
s.save(object);
Name and version of the database you are using:
MySQL 5.
The generated SQL (show_sql=true):
No SQL genernated.
Debug level Hibernate log excerpt:
Nothing
not a transcation issue because other objects are saved correctly. Only objects within <union-subclass> were wrong.
After save(), the UUID was created correctly. But the objects were not saved into database. NO SQL output, no any other debug level info from hibernate.
Thanks a lot for your help.