mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite.
This commit is contained in:
parent
edcc75e5ac
commit
938da36cb1
4 changed files with 30 additions and 1 deletions
|
@ -239,3 +239,9 @@ class RawQueryTests(TestCase):
|
|||
|
||||
def test_query_count(self):
|
||||
self.assertNumQueries(1, list, Author.objects.raw("SELECT * FROM raw_query_author"))
|
||||
|
||||
def test_subquery_in_raw_sql(self):
|
||||
try:
|
||||
list(Book.objects.raw('SELECT "id" FROM (SELECT * FROM raw_query_book WHERE paperback) sq'))
|
||||
except InvalidQuery:
|
||||
self.fail("Using a subquery in a RawQuerySet raised InvalidQuery")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue