我正在使用带有 oracle 后端的 django 1.4
在我的 models.py 中,我有:
class ProteinTherapeutics(models.Model):
#...
class Meta:
db_table = 'mnowotka\".\"protein_therapeutics'
managed=False
和这个:
ProteinTherapeutics.objects.exists()
产生这个 SQL:
SELECT *
FROM
(SELECT ROWNUM AS "_RN",
"_SUB".*
FROM
(SELECT (1) AS "A"
FROM "MNOWOTKA"."PROTEIN_THERAPEFB7C") "_SUB"
WHERE ROWNUM <= 1)
WHERE "_RN" > 0 [1.99ms]
你能帮我吗?