add property to disable metamodel generation, just in case as it's undertested

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17301 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2009-08-13 20:15:08 +00:00
parent c35efa6780
commit d6702fae4a
1 changed files with 7 additions and 1 deletions

View File

@ -65,7 +65,13 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
this.sessionInterceptorClass = sessionInterceptorClass;
@SuppressWarnings( "unchecked" )
final Iterator<PersistentClass> classes = cfg.getClassMappings();
this.metamodel = new MetamodelImpl( classes );
//a safe guard till we are confident that metamodel is wll tested
if ( !"disabled".equalsIgnoreCase( cfg.getProperty( "hibernate.ejb.metamodel.generation" ) ) ) {
this.metamodel = new MetamodelImpl( classes );
}
else {
this.metamodel = null;
}
this.criteriaQueryBuilder = new QueryBuilderImpl( this );
}