0

私のエラーは非常にクレイジーです。エラーをデバッグしたい。log.info $game を挿入すると、エラーはなくなりました。

コード:

private void calcAndUpdateStatEntriesOfOutOfOrderGame(Game game, Team team) {
    Competition competition = game.round.competition
    Round currentRound = competition.currentRound


    // if game of team has been played in current round -> update stats of current round
    // if not => update previous round
    Round statsRound
    if (game.state > Game.STATE_NOT_STARTED) {
        statsRound = currentRound       // the stats of the game are saved to the current round of the competition              
    } else {
        // the home team did not yet play yet at the current round -> save the stats at the previous round, otherwise it will be overwritten when the game is played                    
        statsRound = currentRound.previousRound
    }

    CompetitionTableEntry compTableEntry = CompetitionTableEntry.getByRoundAndTeam(statsRound, team)    // get the stats for home team / round of game      
    if (!compTableEntry) {
        // looks like there are no stats created for this round yet => create them
        createCompetitionRankingEntries(statsRound, false)
        compTableEntry = CompetitionTableEntry.getByRoundAndTeam(statsRound, team)
    }

    def stats = getStatisticsForTeamUntilGame(competition, game, team)
    compTableEntry.properties = stats
    compTableEntry.save()
}

エラー:

Error 500: Executing action [updateResult] of controller [at.ligaportal.GameController] caused exception: collection [at.ligaportal.Team.staffMembers] was not processed by flush()
Servlet: grails
URI: /ligaportal/grails/game/updateResult.dispatch
Exception Message: collection [at.ligaportal.Team.staffMembers] was not processed by flush() 
Caused by: collection [at.ligaportal.Team.staffMembers] was not processed by flush() 
Class: ApiAuthenticationFilter 
At Line: [77] 
Code Snippet:

Round currentRound = competition.currentRound行の後に追加すると

log.info "$game"

エラーはなくなり、すべて正常に動作します。しかし、これは私の修正なしです...

私の本当の問題はどこですか?

4

0 に答える 0