Allow for exclusion of persisted classes by package in metamodel

Description

This improvement would work around the need for "any" mapping support as given in HHH-6589.

I am upgrading from Hibernate 3.2.x to 3.5.5 and getting UnsupportedOperationExceptions thrown when Hibernate is trying to create the metamodel. This is due to the dependency of my application upon jBPM 3.x, which uses "any" mappings for some of its classes.

If Hibernate can not support "any" mappings then it could workaround this limitation by allowing for the exclusion of persistent classes by package name. For example, in my application I have no need for the metamodel to include the jBPM classes (don't need criteria api to be applied to them). These classes contain "any" mappings that break the generation of the metamodel. The metamodel boundaries could be cleanly set if all the jBPM classes (packages org.jbpm.*) were excluded from the generation of the metamodel. This could be done like so in org.hibernate.ejb.EntityManagerFactoryImpl constructor:

A configuration list property with items being the package root names to exclude should work.

Environment

Hibernate 3.5.5, PostgreSQL 8.4

Assignee

Unassigned

Reporter

Robert Brady

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure