I am not able to figure out where to file a bug for this
Getting the following exception with the scalar fields are added for result mapping.
jakarta.persistence.PersistenceException: Converting org.hibernate.loader.NonUniqueDiscoveredSqlAliasException
to JPA PersistenceException
: Encountered a duplicated sql alias [LABEL] during auto-discovery of a native-sql query
public void testCase(SessionFactory sessionFactory) {
try {
NativeQuery query = sessionFactory.openSession().createNativeQuery(
"SELECT FIELD_ID,LABEL,LABEL FROM DUMMY_TABLE ORDER BY LABEL ");
query.addScalar("FIELD_ID", StandardBasicTypes.INTEGER);
query.addScalar("LABEL", StandardBasicTypes.STRING);
query.list();
} catch (HibernateException e) {
throw new RuntimeException(e);
}
}```