Hi all,
I want to use hibernate to model a table view. The view is a table like :
select cart_id, avg(price), count(cart_id) from items group by cart_id.
Currently, by modelling in hbm.xml, it's very troublesome when I do the schema export. It first create a table and then I have to remove it and create the view again by a sql.
Is there any way that I could put this sql into the hbm.xml file (or other methods) such that it will be generated automatically when I do the schema export.
Thanks.
Perseus
|