HHH-8222 - Implement @NamedStoredProcedureQuery binding
This commit is contained in:
parent
e9a54405c2
commit
9a590c8e69
|
@ -173,17 +173,16 @@ public class Util {
|
|||
* @param resultClasses The Classes to which the results should be mapped
|
||||
*/
|
||||
public static void resolveResultClasses(ResultClassesResolutionContext context, Class... resultClasses) {
|
||||
int i = 1;
|
||||
int i = 0;
|
||||
for ( Class resultClass : resultClasses ) {
|
||||
context.addQueryReturns(
|
||||
new NativeSQLQueryRootReturn( "alias" + i, resultClass.getName(), LockMode.READ )
|
||||
new NativeSQLQueryRootReturn( "alias" + (++i), resultClass.getName(), LockMode.READ )
|
||||
);
|
||||
try {
|
||||
final EntityPersister persister = context.getSessionFactory().getEntityPersister( resultClass.getName() );
|
||||
context.addQuerySpaces( (String[]) persister.getQuerySpaces() );
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue