Solved a very nasty bug where the rating results were calculated false.
The sql query returned more than one result. So last one was used for calculation.
Sometimes it was right and sometimes not.
Changed the sql query in the method 'findByPrimaryKeys' to use the rating id of the table 'regions_punkte_stufen' too. Therefore one more parameter is set in the prepared statement.