当我尝试休眠 rx 库并运行示例时
// obtain a reactive session
factory.withTransaction(
// persist the Authors with their Books in a transaction
(session, tx) -> session.persist(author1, author2)
.flatMap(Mutiny.Session::flush)
.flatMap(s -> s.refresh())
)
和
class Author {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
Integer id;
它会抛出 CompletionException
Exception in thread "main" java.util.concurrent.CompletionException: org.hibernate.PropertyAccessException: Could not set field value [1] value by reflection : [class org.hibernate.example.reactive.Author.id] setter of org.hibernate.example.reactive.Author.id
我在https://github.com/semistone/hibernate-reactive/commit/398b1570666ed81a7d257020166f2ae59f1c5eb8推送测试代码
有人可以帮忙检查一下。
谢谢