File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed 
hibernate-core/src/main/java/org/hibernate/sql/results/jdbc/internal Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 88import  java .sql .SQLException ;
99
1010import  jakarta .persistence .EnumType ;
11+ import  org .hibernate .boot .model .naming .Identifier ;
1112import  org .hibernate .dialect .Dialect ;
1213import  org .hibernate .engine .jdbc .spi .SqlExceptionHelper ;
1314import  org .hibernate .engine .spi .SessionFactoryImplementor ;
1415import  org .hibernate .engine .spi .SharedSessionContractImplementor ;
15- import  org .hibernate .internal .util .StringHelper ;
1616import  org .hibernate .type .BasicType ;
1717import  org .hibernate .type .descriptor .java .JavaType ;
1818import  org .hibernate .type .descriptor .jdbc .JdbcType ;
@@ -75,15 +75,19 @@ public int getColumnCount() {
7575	@ Override 
7676	public  int  resolveColumnPosition (String  columnName ) {
7777		try  {
78- 			return  getResultSet ()
79- 					.findColumn ( StringHelper .unquote ( columnName , getDialect () ) );
78+ 			return  getResultSet ().findColumn ( normalizeColumnName ( columnName  ) );
8079		}
8180		catch  (SQLException  e ) {
8281			throw  getSqlExceptionHelper ()
8382					.convert ( e , "Unable to find column position by name: "  + columnName  );
8483		}
8584	}
8685
86+ 	private  String  normalizeColumnName (String  columnName ) {
87+ 		return  getFactory ().getJdbcServices ().getJdbcEnvironment ().getIdentifierHelper ()
88+ 				.toMetaDataObjectName ( Identifier .toIdentifier ( columnName  ) );
89+ 	}
90+ 
8791	@ Override 
8892	public  String  resolveColumnName (int  position ) {
8993		try  {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments