We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87af04a commit f15923dCopy full SHA for f15923d
cardinal_pythonlib/sqlalchemy/tests/schema_tests.py
@@ -307,12 +307,14 @@ def _attach_view(
307
of "selectable") is created after the table is created, and dropped before
308
the table is dropped, via listeners.
309
"""
310
- t = table(tablename)
311
-
312
- # noinspection PyProtectedMember
313
- t._columns._populate_separate_keys(
314
- col._make_proxy(t) for col in selectable.selected_columns
+ t = table(
+ tablename,
+ *(
+ Column(c.name, c.type, primary_key=c.primary_key)
+ for c in selectable.selected_columns
315
+ ),
316
)
317
+ t.primary_key.update(c for c in t.c if c.primary_key)
318
319
event.listen(
320
metadata,
0 commit comments