xantier
09/11/2017, 9:14 AM@Query("select new com.packageName.SomeDTO(field, field, field, name) from ...")
xantier
09/11/2017, 9:17 AMnoone
09/11/2017, 4:19 PMxantier
09/11/2017, 5:26 PMxantier
09/12/2017, 6:12 AMnew com.packge...
constuctor call. You can also use nativequery to with the @Query annotation but to map it into an object automatically it needs to be a namedquery with a resultsetmapping defined for it (like in here: https://stackoverflow.com/questions/29082749/spring-data-jpa-map-the-result-to-non-entity-pojo#answer-31966870). The third one is to drop outside of the interface and implement it manually with RowMapper
. I'd go with number 1 first if there is nothing preventing you adding that dep (like attempts to a bounded context), if that's not possible I'd go with number 3.noone
09/13/2017, 2:29 PM