IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

File | Project Structure | Modules - module - Hibernate or JPA facet


Use this page to download missing libraries, set up configuration files, and mappings to the data sources for the Hibernate or JPA facet.


Controls for the above mentioned facets are similar, and the differences are specially marked.

Item Description
Descriptors Use this section to manage and edit the configuration descriptors. For Hibernate, you can create Hibernate descriptors of the type hibernate.cfg.xml in the specified locations.

For JPA you can create the files persistence.xml and orm.xml.

add ( or or or or ) Use this icon or shortcut to create a new descriptor.
edit1 () Use this icon or shortcut to change the selected descriptor.
delete () Use this icon or shortcut to remove the selected descriptor.
Data Source Mappings Use this section to map session factories or persistence units to the data sources configured in your workspace.

Mapping to data sources works differently for Hibernate and JPA facets:

  • Hibernate: when a Hibernate configuration descriptor is created, click Apply. After that, an entry with the descriptor name is added to the Session Factory column.
  • JPA: when a persistence unit is created in a module, the corresponding entry is added to the Persistence Unit column.

In the Data Source column, double-click a line and select the desired data source from the drop-down list.

Validate Model on Compilation Select this check box to perform validation.
Default JPA Provider


This control is available for JPA facet only.

Select the JPA provider that will be used to generate mappings. The possible options are: Hibernate, OpenJPA, and TopLink. If a provider is not specified, all the supported providers are used.

See Also



Web Resources: