|
Do you understand the reason for specifying an entity name? It is used when we want to map the same class several times to distinct tables. So how would session.load( Class, .. ) work in that case? So yes, session.load( Class, .. ) ought to throw an exception when an entity name is used.
And its not an inconsistency with what HQL and Criteria queries do, as I stated before. Querying is inherently polymorphic in Hibernate. Again, even the HQL from java.lang.Object is valid though obviously you dont map the java.lang.Object class.
|