0

我得到一个Error: MismatchedTokenException(-1!=104)

如果我使用该查询,则会出现错误:

String hql2 = "UPDATE Buchung as b " +
              "set SERIENE = SERIENE + 1 " +
              "where ID in (SELECT rr.Buchung from Raumreservierung rr " +
              "where CHECK_IN_HAPPEND = :CheckInHappend and SERIENBOOKUID = :SerieID)";

有人能帮我吗?我究竟做错了什么?

4

1 回答 1

0

尝试将别名放在 where 条件中

String hql2 = "UPDATE Buchung as b " +
    "set SERIENE = SERIENE + 1 " +
    "where ID in (SELECT rr.Buchung from Raumreservierung rr " +
    "where rr.CHECK_IN_HAPPEND = :CheckInHappend and rr.SERIENBOOKUID = :SerieID)";
于 2013-08-13T14:48:41.423 回答