小编use*_*775的帖子

Springboot 3.0:Hiberanate/JPA 6 验证失败

我有这样的方法

 @Modifying( clearAutomatically = true )
    @Query( "update versioned LookupMaster set state =  'PUBLISHED' , value = newValue, newValue = null, updatedDate = current_timestamp where ( name = :tableName and state = 'MODIFIED')" )
    void commitLookupTableChanges( String tableName );
Run Code Online (Sandbox Code Playgroud)

在 springboot 3 升级之前它可以工作。springboot 升级到版本 3.0.2 后面临如下验证错误。

Caused by: java.lang.IllegalArgumentException: org.hibernate.query.SemanticException: The assignment expression type [java.lang.String] did not match the assignment path type [com.nokia.nsw.lookuptable.model.RowState] for the path [alias_2093546827.state] [update versioned LookupMaster set state =  'PUBLISHED' , value = newValue, newValue = …
Run Code Online (Sandbox Code Playgroud)

hibernate jpa spring-data-jpa spring-boot

4
推荐指数
1
解决办法
1071
查看次数

标签 统计

hibernate ×1

jpa ×1

spring-boot ×1

spring-data-jpa ×1