@@ -99,24 +99,23 @@ public SessionFactory buildSessionFactory() throws HibernateException {
9999 * domain classes
100100 */
101101 protected void secondPassCompile () throws MappingException {
102- if (configLocked ) {
103- return ;
104- }
105- if (LOG .isDebugEnabled ()) {
106- LOG .debug ("[GrailsAnnotationConfiguration] [" + this .domainClasses .size () + "] Grails domain classes to bind to persistence runtime" );
107- }
102+ if (!configLocked ) {
103+ if (LOG .isDebugEnabled ()) {
104+ LOG .debug ("[GrailsAnnotationConfiguration] [" + this .domainClasses .size () + "] Grails domain classes to bind to persistence runtime" );
105+ }
108106
109- // do Grails class configuration
110- for (GrailsDomainClass domainClass : this .domainClasses ) {
111- GrailsDomainBinder .evaluateMapping (domainClass );
112- }
107+ // do Grails class configuration
108+ for (GrailsDomainClass domainClass : this .domainClasses ) {
109+ GrailsDomainBinder .evaluateMapping (domainClass );
110+ }
113111
114- // do Grails class configuration
115- for (GrailsDomainClass domainClass : this .domainClasses ) {
116- if (LOG .isDebugEnabled ()) {
117- LOG .debug ("[GrailsAnnotationConfiguration] Binding persistent class [" + domainClass .getFullName () + "]" );
112+ // do Grails class configuration
113+ for (GrailsDomainClass domainClass : this .domainClasses ) {
114+ if (LOG .isDebugEnabled ()) {
115+ LOG .debug ("[GrailsAnnotationConfiguration] Binding persistent class [" + domainClass .getFullName () + "]" );
116+ }
117+ GrailsDomainBinder .bindClass (domainClass , super .createMappings ());
118118 }
119- GrailsDomainBinder .bindClass (domainClass , super .createMappings ());
120119 }
121120
122121 // call super
0 commit comments