File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/com/web/spring/datatable Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >com.github.lwfwind.web</groupId >
8
8
<artifactId >spring-jquery-datatable</artifactId >
9
- <version >2.2 </version >
9
+ <version >2.3 </version >
10
10
<packaging >jar</packaging >
11
11
<description >Spring extension to work with the great jQuery plugin DataTables</description >
12
12
<url >https://github.com/lwfwind/spring-jquery-datatable</url >
Original file line number Diff line number Diff line change 16
16
17
17
public class TableQuery {
18
18
private static HashMap <String , Boolean > innodbMap = new HashMap <>();
19
- private static boolean isInnodbFlag = false ;
19
+ private static HashMap < EntityManager , Boolean > entityManagerInitMap = new HashMap <>() ;
20
20
private EntityManager entityManager ;
21
21
private Class entiteClass ;
22
22
private DatatablesCriterias criterias ;
@@ -76,13 +76,13 @@ public void init() {
76
76
this .entiteTableName = this .entiteClass .getSimpleName ();
77
77
}
78
78
79
- if (! isInnodbFlag ) {
79
+ if (entityManagerInitMap . get ( this . entityManager ) == null ) {
80
80
Query query = this .entityManager .createNativeQuery ("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB'" );
81
81
List <Object > result = query .getResultList ();
82
82
for (Object object : result ) {
83
83
innodbMap .put (object .toString (), true );
84
84
}
85
- isInnodbFlag = true ;
85
+ entityManagerInitMap . put ( this . entityManager , true ) ;
86
86
}
87
87
}
88
88
You can’t perform that action at this time.
0 commit comments