We're updating the issue view to help you get more done. 

Add new setting to disable/enable scanning for the static metamodel.

Description

Currently Hibernate always scans classpath for the static metamodel. But not all projects make use of the static metamodel. For big projects (e.g. ca. 2000 entity and embeddable classes in our case) it takes a lot of time to scan the classpath for classes which do not exists. Therefore I propose a new setting "hibernate.static_metamodel.enabled" which would allow us to disable scanning the classpath for the static metamodel. If the setting is set to "false", then Hibernate will not scan the classpath for the static metamodel. The default value for the setting will be "true" to preserve current behavior of Hibernate.

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Andrej Golovnin

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

backportDecision

None

Components

Affects versions

5.2.0

Priority

Minor