Well, I thought they were because of this comment in hibernate-core/src/main/antlr/hql.g:
Represents the JPA 2.1 TREAT construct when applied to a join. Hibernate already handles subclass property references implicitly, so we simply "eat" all tokens of the TREAT construct and just return the join path itself.
(line 376 to 378).
Furthermore, if selecting an attribute from a subclass invalid, why does the following query succeed?
select h.nickName from Animal h
Note that I made a mistake in the description. The failing query is in fact:
select h.mother.nickName from Animal h
|