When I try hibernate rx library and running the examples
// 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())
)
and
class Author {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
Integer id;
it will throw 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
I push test code in https://github.com/semistone/hibernate-reactive/commit/398b1570666ed81a7d257020166f2ae59f1c5eb8
could someone help to check it?
Thanks
I post in
https://stackoverflow.com/questions/62946269/hibernate-rx-insert-and-flush-return-exception-when-strategy-is-identity also