mapping Hibernate query results to custom class?

前端 未结 8 735
时光说笑
时光说笑 2020-12-01 11:02

Following up on a question I posted yesterday: How to populate POJO class from custom Hibernate query?

Can someone show me an example of how to code the following SQ

8条回答
  •  一生所求
    2020-12-01 11:27

    java.lang.ClassCastException: "CustomClass" cannot be cast to java.util.Map.

    This issue appears when the columns specified in SQL Query doesn't match with the columns of the mapping class.

    It may be due to:

    • Non-matching casing of column name or

    • The column names are not matching or

    • column exist in query but missing in class.

提交回复
热议问题