From 16725b95237ee9af10e3fc16e6a17909c04a89bf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 15 Aug 2023 09:38:52 -0400 Subject: [PATCH] fix test case for SQL server Change-Id: I607a825e8d2c5b27e7404239e1a6c1a5340532e7 --- test/orm/test_relationship_criteria.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/orm/test_relationship_criteria.py b/test/orm/test_relationship_criteria.py index 31423e5f4a..e67f9a01d5 100644 --- a/test/orm/test_relationship_criteria.py +++ b/test/orm/test_relationship_criteria.py @@ -2390,7 +2390,7 @@ class SubqueryCriteriaTest(fixtures.DeclarativeMappedTest): class Color(Base): __tablename__ = "color" id: Mapped[int] = mapped_column(primary_key=True) - name: Mapped[str] = mapped_column(unique=True) + name: Mapped[str] = mapped_column(String(50)) temperature_id: Mapped[int] = mapped_column( ForeignKey("temperature.id") ) @@ -2418,7 +2418,7 @@ class SubqueryCriteriaTest(fixtures.DeclarativeMappedTest): class Room(Base): __tablename__ = "room" id: Mapped[int] = mapped_column(primary_key=True) - token: Mapped[str] = mapped_column(unique=True) + token: Mapped[str] = mapped_column(String(50)) color_id: Mapped[int] = mapped_column(ForeignKey("color.id")) color: Mapped[Color] = relationship() connected_rooms: Mapped[List["Room"]] = relationship( # noqa: F821 @@ -2519,7 +2519,7 @@ class SubqueryCriteriaTest(fixtures.DeclarativeMappedTest): room_result = session.scalars( select(Room) - .order_by(Room.id) + .order_by(Room.id, room_alias.id) .join(Room.color.and_(Color.name == "red")) .join( room_alias, -- 2.47.3