0 Replies Latest reply on Aug 8, 2013 3:28 AM by Milind Bharambe

    How to create hbm.xml file for mysql view and how to add it in hibernate configuration?

    Milind Bharambe Newbie

      I have created mysql view for two tables which are in different schema using JDBC, because hibernate is not providing any facility do the same. I am using entity_mode as dynamic-map, so I have to create hibernate configuration by adding documents of hbm.xml files of all my entities from my schema.

      My question is, how do I create hbm.xml for view? Because it has some different structure than the other hbm.xml files of entities. How to add view mapping to the hibernate configuration, So I can do at least read operations using hibernate queries?

      Is this possible in hibernate? If yes then how can I achieve this?