How does one do a find() with a polymorphic table-per-contrete-class strategy? By that I mean, what is the hibernate type in the query?
My mapping in Grade.hbm.xml is:
<any name="parent" id-type="long" meta-type="edu.academyart.model.GradableTypeManager">
<column name="parentType"/>
<column name="parentId"/>
</any>
and I want to match a very specific parent:
return hibernate.find(
"from Grade as grade where grade.parent= ? and grade.course = ? ",...)
I can't use a hibernate.entity; I get "path expression ends in a composite value." Do I have to do parent.id=? and parent.class=?, even though I have a user type that knows how to convert these things for me?
|