Could you please help me to solve the problem below
I have a entity class:
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
@Id
private Long id;
private String name;
}
and I save it in Postgresql with the code:
public Mono<User> save(User user){
return databaseClient().inTransaction(db -> {
return db
.insert()
.into(User.class)
.using(user)
//todo: return saved user
});
}
I wish to get saved User, how I can do