Native SQL query for an Hibernate entity using @Formula results in NullPointerException

前端 未结 3 2091
忘掉有多难
忘掉有多难 2020-12-11 15:58

I\'ve got an simple Hibernate entity for which I use the @Formula annotion:

    @Id
private Long id;

private String name;

@Formula(\"(select count(f.*) fro         


        
3条回答
  •  感情败类
    2020-12-11 16:14

    Indeed, this seems to be the problem reported in HHH-2225 (that HHH-2536 duplicates). Unfortunately, the issue is not fixed and I'm afraid you'll have to either use HQL or submit a patch (you can start with voting on the issue but I wouldn't expect a fast resolution given that this issue is almost four years old).

提交回复
热议问题