[quote="Dencel"]You can simply specify the interface in your mapping files.
Code:
<many-to-one name="bla" class="myInterface"/>
That's what I tried to do. When I do a build, though, I get the following error:
"An association from the table address refers to an unmapped class: mypackage.AddressOwner"
I clearly have to specify a class which has a mapping. But I don't want to have a mapping for the IAddressOwner, because I don't want to have an AddressOwner table, that would defeat the object. As I understand it, as I want my various implementations of the AddressOwner interface (Customer, Organisation) to have their own tables, and therefore I am using the table-per-concrete-class strategy, I should be getting implicit polymorphism, shouldn't I?