In some entities have it's formulas,
but there is a bug in formula parser.
For instance I have
class Order
{
..
public virtual int CountOfOrderLines { get; set; }
}
so I have a formula for CountOfOrderLines as
(SELECT COUNT(ORDER_LINE.ORDER_LINE_ID)
FROM ORDER_LINE
WHERE ORDER_LINE.REF_ORDER_MASTER = ORDER_MASTER_ID
)
if execute an hql like "from Order o"
but the generated sql is like
select order0_.ORDER_ID as ORDER1_36_, ... , order0_.(SELECT COUNT(ORDER_LINE.ORDER_LINE_ID)
FROM ORDER_LINE
WHERE ORDER_LINE.REF_ORDER_MASTER = ORDER_MASTER_ID
) AS column12_36_, ... FROM from ORDER order0_
now the bug is in generated hql expressin order0_.( in formula,
|