I have Result entity and User entity and they are linked via @OneToOne annotation:
@OneToOne
@MapsId
private User user;
and
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL)
private Result result;
but when I try to get all results via ajax:
resultRepo.findAll()
results are coming with users with all user fields including password and etc. How to get only specific fields from User entity when I request all results ?