Usring SDR. i have an entity, PersonRole, based on a join table. For a report i want the min date between two different columns of the tables joined by the join table. i work on an intranet so her is some pseudo code...
select
pr,
if pr.dateOne < pr.dateTwo then pr.dateOne else pr.dateTwo end as minDate
from
PersonRole pr
...
now, i've used DTOs to get extra data along with my entities when i only care about getting the DTO data and no HATEOAS related data.
basically i want something like this...
personRole : [ {
person : {
dateOne: blah
},
role : {
dateTwo: blah
},
minDate: this is a min of person.dateOne and role.dateTwo
}]