Open stj-mv opened 1 year ago
Model:
class M(models.Model): id = models.IntegerField(primary_key=True)
v = M.objects.all() v.exists()
Generated SQL statement: SELECT FIRST 1 ? AS a FROM m PARAMS = (1,)
Returned error: [Informix][Informix ODBC Driver][Informix]A syntax error has occurred. (-201) (SQLPrepare)
This works fine in isql and dbaccess (without params).
Could anyone confirm this? Any ideas?
Additional info: As far as I know, fieldnames cannot be a bound item and must be a literal. So the bad SQL statement should be
SELECT FIRST 1 1 AS a FROM m
Correct me if I'm wrong.
Model:
class M(models.Model): id = models.IntegerField(primary_key=True)
v = M.objects.all() v.exists()
Generated SQL statement: SELECT FIRST 1 ? AS a FROM m PARAMS = (1,)
Returned error: [Informix][Informix ODBC Driver][Informix]A syntax error has occurred. (-201) (SQLPrepare)
This works fine in isql and dbaccess (without params).
Could anyone confirm this? Any ideas?