I'm facing an issue when i call the deleteAllRecords() method over a foundset that points to a table whose name has over tan 30 characters. It started to happen in 2021.12.1 update and it keeps the same in 2021.12.2.
The exact case is the following. I have a Mariadb table named factc_ind_calidad_rechazados_lotes and i execute the following code:
- Code: Select all
/** @type {JSFoundset<db:/qdw/factc_ind_calidad_rechazados_lotes>}*/
var fs_factc_ind_calidad_rechazados_lotes = databaseManager.getFoundSet('qdw','factc_ind_calidad_rechazados_lotes')
fs_factc_ind_calidad_rechazados_lotes.find()
fs_factc_ind_calidad_rechazados_lotes.elab_dc_aprob_calidad_fec = utils.dateFormat(tmp_fecha_inicial,'yyyy-MM-dd') + ' 00:00:00...' + utils.dateFormat(tmp_fecha_final,'yyyy-MM-dd') + ' 23:59:59|yyyy-MM-dd HH:mm:ss'
fs_factc_ind_calidad_rechazados_lotes.search()
if (fs_factc_ind_calidad_rechazados_lotes.getSize() > 0) {
fs_factc_ind_calidad_rechazados_lotes.deleteAllRecords()
}
After that i get this error:
- Code: Select all
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'factc_calidad_rechazados_lotes where factc_calidad_rechazados_lotes.elab_dc_a...' at line 1
Query is: delete from factc_ind_calidad_rechazados_lotes factc_calidad_rechazados_lotes where factc_calidad_rechazados_lotes.elab_dc_aprob_calidad_fec between ? and ?, parameters ['2019-01-01 00:00:00.0','2022-02-04 23:59:59.0']
As you can notice the query is wrongly typed. This is one example but it happens me with all the tables whose name has over tan 30 characters.
Please help.