Q: Spring-Boot | SqlResultSetMapping for just one attribute In our project we just get the ids from the study table. Do we need a SqlResultSetMapping or is it enough to just declare that we will get UUIDs from the query? When yes, how?
Mapping
@SqlResultSetMapping(name = "StudyMapping", classes = {
        @ConstructorResult(targetClass = StudyId.class,
                columns = {
                        @ColumnResult(name = "id", type = UUID.class)
                }
        )
})


Class for the mapping StudyId
@AllArgsConstructor
@Builder
@Getter
@Setter
public class StudyId {
    private UUID id;
}


Query
SELECT DISTINCT id FROM Study;

