"no converter found capable of converting from type to type" Code Answer
3
return abdeadlinetype from repository:
public interface abdeadlinetyperepository extends jparepository<abdeadlinetype, long> {
list<abdeadlinetype> findallsummarizedby();
}
and then convert to deadlinetype. manually or use mapstruct.
or call constructor from @query annotation:
public interface deadlinetyperepository extends jparepository<abdeadlinetype, long> {
@query("select new package.deadlinetype(a.id, a.code) from abdeadlinetype a ")
list<deadlinetype> findallsummarizedby();
}
return
abdeadlinetype
from repository:and then convert to deadlinetype. manually or use mapstruct.
or call constructor from
@query
annotation:or use
@projection
:update: spring can work without
@projection
annotation: