List of usage examples for javax.persistence ValidationMode CALLBACK
ValidationMode CALLBACK
To view the source code for javax.persistence ValidationMode CALLBACK.
Click Source Link
From source file:com.devicehive.application.RdbmsPersistenceConfig.java
@Bean @Autowired// w w w . java2s .c o m @DependsOn(value = { "simpleApplicationContextHolder" }) public LocalContainerEntityManagerFactoryBean entityManagerFactory() { final LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean(); factoryBean.setDataSource(dataSource); factoryBean.setSharedCacheMode(SharedCacheMode.ENABLE_SELECTIVE); factoryBean.setValidationMode(ValidationMode.CALLBACK); factoryBean.setJpaVendorAdapter(jpaVendorAdapter); factoryBean.setPackagesToScan("com.devicehive.model"); final Properties props = new Properties(); props.putAll(this.properties.getHibernateProperties(this.dataSource)); factoryBean.setJpaProperties(props); return factoryBean; }