When I try to delete a subclass entity, the resulting SQL is bad; it appears to be assuming an alias is being used when it isn't.
Mapping file (partial):
<hibernate-mapping>
<class name="com.wotif.jaguar.domain.Comment"
table="COMMENTS" dynamic-update="false" dynamic-insert="false"
select-before-update="false" optimistic-lock="version"
discriminator-value="null" >
...
<subclass
name="com.wotif.jaguar.domain.property.PropertyComment"
dynamic-update="false"
dynamic-insert="false"
discriminator-value="0"
>
...
</class>
</hibernate-mapping>
19/04/2005 14:25:20 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: HQL: delete from com.wotif.jaguar.domain.property.PropertyComment
19/04/2005 14:25:20 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: SQL: delete from COMMENTS where propertyco0_.CommentType=0
Under Hibernate 2.1.6, the generated SQL was:
delete from COMMENTS propertyco0_ where propertyco0_.CommentType = 0
My guess: the change to remove aliasing for update/deletes caused this to break.
Thanks for (at least) the 5th bug report on this. I am getting mildly annoyed with having to answer this over and over.
This has been fixed in CVS for almost 3 weeks now. Fixes released in 3.0.1.