我想加入2个表并获取表1的数据并映射到表1实体

时间:2020-04-28 14:17:17

标签: java spring jpa

[![表1] [1]] [1]

[![表2] [2]] [2]

我想使用partyid将上述2个表联接起来,并获取table1 (id, name, company, partyid)的用户数据并映射到table1实体,是否可以使用JPA?

运行时出现异常

Failed to convert from type [java.lang.Object[]] to type [com.test.entity.table1]
nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Long] to type [com.test.entity.table1] ```

Can anyone answer this question, please?
Thanks in advance.


  [1]: https://i.stack.imgur.com/Rs78C.png
  [2]: https://i.stack.imgur.com/e8zij.png

0 个答案:

没有答案