Skip to content

Commit 3c80608

Browse files
author
wind
committed
update
1 parent fee9d16 commit 3c80608

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.lwfwind.web</groupId>
88
<artifactId>spring-jquery-datatable</artifactId>
9-
<version>2.2</version>
9+
<version>2.3</version>
1010
<packaging>jar</packaging>
1111
<description>Spring extension to work with the great jQuery plugin DataTables</description>
1212
<url>https://github.com/lwfwind/spring-jquery-datatable</url>

src/com/web/spring/datatable/TableQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
public class TableQuery {
1818
private static HashMap<String, Boolean> innodbMap = new HashMap<>();
19-
private static boolean isInnodbFlag = false;
19+
private static HashMap<EntityManager, Boolean> entityManagerInitMap = new HashMap<>();
2020
private EntityManager entityManager;
2121
private Class entiteClass;
2222
private DatatablesCriterias criterias;
@@ -76,13 +76,13 @@ public void init() {
7676
this.entiteTableName = this.entiteClass.getSimpleName();
7777
}
7878

79-
if (!isInnodbFlag) {
79+
if (entityManagerInitMap.get(this.entityManager) == null) {
8080
Query query = this.entityManager.createNativeQuery("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB'");
8181
List<Object> result = query.getResultList();
8282
for (Object object : result) {
8383
innodbMap.put(object.toString(), true);
8484
}
85-
isInnodbFlag = true;
85+
entityManagerInitMap.put(this.entityManager,true);
8686
}
8787
}
8888

0 commit comments

Comments
 (0)