Error in creating alias in formula tag
I have a sql query in formula tag inside property tag.
In that query i am creating alias name but the hibernate appe开发者_如何学Pythonnds table name and throwing me error.
select sum(e.salary) as sal from employee e
but hibernate changes to
select sum(e.salary) as employee.sal from employee e
how to avoid this ....
it should recognise as sal inside of employee.sal !!!
Why don't you just declare:
<property name="salary" type="integer"
formula="( select sum(e.salary) from employee e )">
</property>
What's the point of the alias?
精彩评论