FAQ

This section presents the project overview, common doubts and workaround tips.

What ORM libraries are supported by the ORM Generator?

At the moment only Hibernate Tools is supported. The plugin was built on top of the Reveng Hibernate Tool with the addition of:

  • Customized code templates for additional features (namely more finder methods on the DAOs)
  • IoC Layer to provide loosely-coupled integration with client applications
  • Factory class using the DiF Model project that provides customizable datasources

Which database back ends does ORM Generator support?

ORM Generator supports all the Hibernate natively supported databases. See the full list here.

I can't compile the generated classes. Always issues missing classes in classpath.

ORM Generator generated code for the DIF2 platform. This is a mandatory dependency, unless you change the reverse engineering templates witch reference these classes. Doing so you will surely loose substantial functionalities, given by the DIF2 Model package.

How is ORM Generator configured?

ORM Generator allows for several configuration parameters and configuration files. You can read how to use them in the User Guide section.

Can I have a database for generation and another for deployment?

By default, ORM Generator uses the configuration files from the "src/main/config" directory for the reverse engineering process.
If you wish to provide a different configuration for packaging/deploy you should add it to the src/main/resources, as specified by Maven.

All content on "src/main/config" will be ignored by Maven in the packaging process.

Can I write custom code in the DAOs without being overwritten in subsequent code generations?

Yes, you can. Place the code in the "dao/auto/impl" folder of your model package and ORM Generator will pick it up and link to it. See the User Guide for more details on how to do this.

I have provided an hibernate.cfg.xml file but the Session Factory can't access it.

By convention your hibernate configuration file must have a name like this: "dataSourceName".cfg.xml, where "dataSourceName" is the name you have provided in the dataSourceName parameter of the ORM Generator Plugin.
You should rename your hibernate.cfg.xml in both config and resource folders to this notation.