org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [com.skywarelabs.runwayreporting.api.modules.asset.Asset] to type [com.skywarelabs.runwayreporting.api.modules.asset.AssetPageView]
I have two repository methods which do essentialy the same thing. I'm expecting them to return an object of <Page>. If I call findPageByAerodrome, this works correctly. However, If I call findPageByFilter, I get the error below. ..the reason I want to use findPageByFilter is that I wish to extend this with additional filtering parameters.
''' public interface AssetRepository extends PageCrudRepository<Asset, Long> {
@Query("SELECT a FROM Asset a WHERE " +
"(a.aerodrome = :aerodrome)")
<T> Page<T> findPageByFilter(@Param("aerodrome") Aerodrome aerodrome,
Pageable pageable, Class<T> type);
<T> Page<T> findPageByAerodrome(@Param("aerodrome") Aerodrome aerodrome,
Pageable pageable, Class<T> type);
,,,