6 Replies Latest reply on Apr 26, 2011 7:27 AM by maxandersen

    how to customize dao export code

    bcn

      How can I change the scope of the entityManager field in the generated Home classes of the dao exporter to protected?

      That's what I did so far:

      - In Eclipse I added a hibernate.hbm.xml file to the console configuration

      - The console configuration is used in the code generation run configuration which generates the DAOs

      - The hbm.xml looks like:

       

      <hibernate-mapping>

      <meta attribute="scope-field" inherit="true">protected</meta>

      </hibernate-mapping>

       

      I also tried:

      <hibernate-mapping>

      <meta attribute="scope-field" inherit="true">protected</meta>

      <class name="TCity">

      <meta attribute="scope-field">protected</meta>

      <id></id>

      </class>

      </hibernate-mapping>

       

      I observe no effects at all, neither in entity classes nor in dao classes. Either the file is not used or the format is wrong.

       

      Thanks in advance