There is a problem to map POJO to DB View using Hibernate if you are using also HBM2DLL.
In this case the HBM2DLL would create for each HBM mapping a corresponsing DB table.
To solve the problem -
- Write HBM as usual
- Add deletion of the DB table as follow:
DROP TABLE MY_TABLE;
- Create the view as follow (also in databse object tag)
Hibernate would write data and read data now with the DB view.
No comments:
Post a Comment