Django Book 翻译
菜单>:
TOC
返回
原文:
There is an important difference between ``__isnull=True`` and ``__exact=None`` . ``__exact=None`` will *always* return an empty result set, because SQL requires that no value is equal to ``NULL`` . ``__isnull`` determines if the field is currently holding the value of ``NULL`` without performing a comparison.
翻译:
``__isnull=True``和``__exact=None``有一个很主要的区别。因为SQL规定无值就等于``NULL`` ,所以``__exact=None``会 *总是* 返回一个空的结果。``__isnull``则取决于该阈是否当前有值 ``NULL``而不进行比较。
备注:
译者: