|
The test shows that session.load(String, Serializable) succeeds while session.load(Class, Serializable) fails (with essentially the above exception - stack slightly different with 4.3.5).
In contrast neither session.createCriteria(String).list() nor session.createCriteria(Class).list() for example fail in this way: both class name and entity names seem to be accepted. At the very least, this appears to be an inconsistency.
Are you saying that the session.load(Class, ..) should throw the exception when the entity represented by the class is mapped with an entity-name? The javadoc for does not include any caveats that this may be the case.
|