I'm using Hibernate 2.1.1.
I've been reading Chapter 16 - Inheritance Mappings, and it says something I don't understand.
I'm primarily interested in the section that deals with using a table-per-concrete-class strategy.
This section
seems to say that if I have two normally mapped classes (unrelated) and have them both implement the same (unmapped) interface, then they are now part of a table-per-concrete-class mapping?
It then goes on to say (last paragraph of 16.1):
Quote:
If we execute a query against the Payment interface - for example, from Payment - Hibernate automatically returns instances [of the concrete classes]
I'm trying to simplify this situation down (no mappings from other entities to the interface, no properties on the interface), but it's not working for me.
I get an exception:
Code:
net.sf.hibernate.QueryException: unexpected token: as [from ElvasContact as contact]
Am I mis-understanding the documentation? Or am I simplifying the example down too much (maybe I need to have a property declared on the interface)?