79706154

Date: 2025-07-18 12:20:31
Score: 0.5
Natty:
Report link

Formula must be a valid sql. I would write it like with {alias} placehoder which reference table in from clause. Hibernate will replace alias with alias to 'a' table.

@Formula("(SELECT COUNT(*) FROM b WHERE b.a_id = {alias}.id)")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Conrad