@Query(value = "select * from associate_mapping inner join station s on associate_mapping.station_id = s.id \r\n"
+ "inner join shift sh on associate_mapping.shift_id = sh.id inner join line l on l.id = s.line_id \r\n"
+ "where 1=1 and l.line_name = ?1 and sh.shift_name = ?2 ", nativeQuery = true)
List<AssociateMapping> getOperatorRequirementByLineAndShift(String selectedLine, String selectedShift);
и ошибка
Caused by: org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException: Encountered a duplicated sql alias [id] during auto-discovery of a native-sql query
at org.hibernate.loader.custom.CustomLoader.validateAliases(CustomLoader.java:508) ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]