Closed averbraeck closed 11 months ago
Since the database retrieval was based on an SQL string rather than on a jOOQ statement, it was not flagged as being outdated after the database change. The code has been changed into:
List<NewsitemRecord> resultList =
dslContext.selectFrom(Tables.NEWSITEM)
.where(Tables.NEWSITEM.SCENARIO_ID.eq(data.getScenario().getId()))
.and(Tables.NEWSITEM.ROUND_NUMBER.eq(data.getCurrentRoundNumber())).fetch()
.sortDesc(Tables.NEWSITEM.ROUND_NUMBER);
After this change, the results are as expected:
If needed, the 'eq' for the round number can be replaced by 'le' to show news item of the current round and previous rounds.
Message:
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception