Originally posted by avihai marchiano:
the exception cause to rollback.
what i did is un ugly trick i get in reflection (private field )this field from seesionfactoryimpl
I was actually thinking about your issue today while Snowboarding. I was just finding it odd that your might ever be passing a
String for a named query that doesn't exist. Like a user types in a name in some UI and it is just passed.
Anyway, Looking at the Javadoc for Configuration, and why you can't get to it, is
"The Configuration is meant only as an initialization-time object. SessionFactorys are immutable and do not retain any association back to the Configuration."
So it actually no longer exists as a Configuration object after it has already loaded the information. It also appears that the mapping is then stored in ClassMetaData and CollectionMetaData objects, so if you wanted to find out about the mapping for a particular class you can call getClassMetaData passing either a Class or String(name of the entity) to get it. And have fun with it.
Mark