Hi
I want to realize the CRUD by using SQLcontariner with Mysql table
try {
TableQuery q1 = new TableQuery("empinfo", connectionPool);
q1.setVersionColumn("Version");
q1.setDebug(true);
employeeContainer = new SQLContainer(q1);
} catch (SQLException e) {
e.printStackTrace();
}
SQLContainer datasource = new DatabaseHelper().getEmployeeContainer();
employeeTable = new Table();
employeeTable.setContainerDataSource(datasource);
when i open this application in brower, the console would display:
DB → begin transaction
DB → SELECT * FROM empinfo ORDER BY “EmployeeId” ASC LIMIT 1 OFFSET 0
DB → commit
DB → begin transaction
DB → SELECT * FROM empinfo ORDER BY “EmployeeId” ASC LIMIT 1 OFFSET 0
DB → commit
Fetching count…
DB → begin transaction
DB → SELECT COUNT(*) FROM empinfo
why
“DB → begin transaction
DB → SELECT * FROM empinfo ORDER BY “EmployeeId” ASC LIMIT 1 OFFSET 0
DB → commit” twice???
and aslo when i click the table header to ordre,the console would display:
Fetching count…
DB → begin transaction
DB → SELECT COUNT(*) FROM empinfo
DB → commit
DB → begin transaction
DB → SELECT * FROM empinfo ORDER BY “Name” DESC LIMIT 200 OFFSET 0
DB → commit
Does this operation need a qurey database? If so, will the communication volume increase?
Thanks!