diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java index 20b6ceff5..b6216efec 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java @@ -1505,15 +1505,15 @@ else if(tablePerConcreteClass) { configureDerivedProperties(sub, subMapping); } } - Integer bs = m.getBatchSize(); + Integer bs = (m == null) ? null : m.getBatchSize(); if (bs != null) { subClass.setBatchSize(bs); } - if (m.getDynamicUpdate()) { + if (m != null && m.getDynamicUpdate()) { subClass.setDynamicUpdate(true); } - if (m.getDynamicInsert()) { + if (m != null && m.getDynamicInsert()) { subClass.setDynamicInsert(true); }