You're right. The problem is similar (an I admit, I did not read the posts) but not the same ;-).
I read through the posts but I did not find the answer to my question. Obviously one must not integrate mappings for abstract classes or interfaces and it will work for hibernate queries.
But my problem is that hibernate fails to initialize because onother class contains a reference to the interface, that has no mapping file. See mapping for Photo below. Selection is an interface and has no mapping defined (the classes implementing Selection have defined mappings).
Code:
<class
name="de.armax.ce.savas.entity.Photo"
table="Photo">
...
<set lazy="true" cascade="none" access="field"
name="bluredSelections"
>
<key column="photoOID"/>
<one-to-many
class="de.armax.ce.savas.entity.Selection"/>
</set>
</class>
I get an
net.sf.hibernate.MappingException: Association references unmapped class: de.armax.ce.savas.entity.Selection
So my question is: how can I make a reference to such an interface?
Thanks,
Peter