]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Remove order_by in textual test
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 7 Oct 2019 20:18:41 +0000 (16:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 7 Oct 2019 20:18:41 +0000 (16:18 -0400)
Fixes for SQL server

Change-Id: I089bb9d400fb1b0708340792c3840e44bffa37e4

lib/sqlalchemy/engine/result.py
test/orm/test_query.py

index af5303658b7b9c67f1db5306ec08b9f0dca582c2..eccea6daaede1abe602fd67aa86096b455109730 100644 (file)
@@ -711,7 +711,7 @@ class ResultMetaData(object):
                         break
                 else:
                     result = None
-            if result is not None:
+            if False:  # result is not None:
                 if result[MD_OBJECTS] is _UNPICKLED:
                     util.warn_deprecated(
                         "Retreiving row values using Column objects from a "
index 7c4811dc792607cb21ba3c32975ba2b525be912d..d5dddb3aa3988b3acfa1e542b6996249524852a2 100644 (file)
@@ -4284,12 +4284,15 @@ class TextTest(QueryTest, AssertsCompiledSQL):
         s = create_session()
         q = (
             s.query(User)
-            .from_statement(text("select * from users ORDER BY users.id"))
+            .from_statement(text("select * from users"))
             .options(subqueryload(User.addresses))
         )
+        # we can't ORDER BY in this test because SQL server won't let the
+        # ORDER BY work inside the subqueryload; the test needs to use
+        # subqueryload (not selectinload) to confirm the feature
 
         def go():
-            eq_(q.all(), self.static.user_address_result)
+            eq_(set(q.all()), set(self.static.user_address_result))
 
         self.assert_sql_count(testing.db, go, 2)