Spring JPA :: No converter found capable of converting from type

后端 未结 6 1750
有刺的猬
有刺的猬 2021-02-03 23:59

I am using spring with JPA and trying to execute query using @query with SQL query.and trying to map the result to an object. I have different entity class and mapping to other

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 00:22

    replying to @Thanthu

    the code should be like this

    public interface StatsDTO {
        Integer getUserCount();
        Byte getTypeId();
        Instant getModifiedAt();
    }
    

    not this

    public interface StatsDTO {
        Integer getUserCount;
        Byte getTypeId;
        Instant getModifiedAt;
    }
    

提交回复
热议问题