为了账号安全,请及时绑定邮箱和手机立即绑定

Jpa返回对象必须是与Entity类么?

Jpa返回对象必须是与Entity类么?

湖上湖 2019-03-01 11:10:21
@Query(value = "SELECT id as topicId,content FROM bbs_topic WHERE create_time BETWEEN ?1 AND ?2",nativeQuery = true) List<IndexObject> getBbsTopicListByDate(Date fileupdateDate, Date topiclastupdate); 其中IndexObject 是显示层vo。然后报错 org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.Object[]] to type [com.wayne.common.lucene.entity.IndexObject] for value '{59, 再发表一次看看那}'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Integer] to type [com.wayne.common.lucene.entity.IndexObject] 度娘了一下怀疑 jpa返回对象必须是与Entity类相关(Entity就是配置了Java类与数据库映射的Java类)有大神知道对么?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 644 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信