javahibernatemappinghbm

how to generate Hibernate Mapping class from *.hbm.xml class


I want make a generic hibernate API which will create mapping class from hbm.xml and use in generic select method.

Please help me..

Thanks


Solution

  • Hibernate tools (hbm2java) allows you to do this. Read the 5.4.2. POJO java code exporter section or look at the screenshot below.

    POJO java code exporter (<hbm2java>) (Screenshot from Hibernate Tools Reference Guide [pdf])