mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-11 21:54:50 +00:00
SessionImpl.initQueryFromNamedDefinition calls its super implementation AbstractSharedSessionContract.initQueryFromNamedDefinition, which already does a lot of the work performed in SessionImpl.initQueryFromNamedDefinition. The only difference is that SessionImpl uses hints to set values on the query, whereas AbstractSharedSessionContract uses direct calls to setters. But that should produce the same result, since setHint() just delegates to the setters. Only one thing was done in SessionImpl but not in AbstractSharedSessionContract: lock mode handling. I left it in SessionImpl since moving it to the superclass would also affect other subclasses such as StatelessSession or OGM sessions, and I certainly don't want to change any behavior without further investigation.