Hibernate RX insert and flush return Exception when strategy is IDENTITY

When I try hibernate rx library and running the examples

    // obtain a reactive session
            // persist the Authors with their Books in a transaction
            (session, tx) -> session.persist(author1, author2)
                    .flatMap(s -> s.refresh())


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?


I post in
https://stackoverflow.com/questions/62946269/hibernate-rx-insert-and-flush-return-exception-when-strategy-is-identity also

I fix by add setter and getter
and change type from Integer to Long
then it work