Skip to content

Commit

Permalink
HSEARCH-2296 Hibernate ORM now requires an explicit option to allow o…
Browse files Browse the repository at this point in the history
…ut of transaction writes
  • Loading branch information
Sanne committed Oct 5, 2016
1 parent 86c5326 commit 223198b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -151,6 +151,7 @@ public Class<?>[] getAnnotatedClasses() {
// Test setup options - SessionFactory Properties
@Override
public void configure(Map<String,Object> cfg) {
cfg.put( "hibernate.allow_update_outside_transaction", "true" );
cfg.put( "hibernate.search.default." + Environment.READER_STRATEGY, FieldSelectorLeakingReaderProvider.class.getName() );
cfg.put( Environment.ANALYZER_CLASS, SimpleAnalyzer.class.getName() );
}
Expand Down
Expand Up @@ -9,6 +9,7 @@
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;

import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;
Expand Down Expand Up @@ -91,4 +92,10 @@ private int getDocumentNumber() throws IOException {
public Class<?>[] getAnnotatedClasses() {
return new Class[] { Document.class };
}

@Override
public void configure(Map<String,Object> cfg) {
cfg.put( "hibernate.allow_update_outside_transaction", "true" );
}

}

0 comments on commit 223198b

Please sign in to comment.