@@ -56,14 +56,6 @@ def __repr__(self):
56
56
return "{} {}" .format (self .first_name , self .last_name )
57
57
58
58
59
- class Article (Base ):
60
- __tablename__ = "articles"
61
- id = Column (Integer (), primary_key = True )
62
- headline = Column (String (100 ))
63
- pub_date = Column (Date ())
64
- reporter_id = Column (Integer (), ForeignKey ("reporters.id" ))
65
-
66
-
67
59
class Reporter (Base ):
68
60
__tablename__ = "reporters"
69
61
@@ -107,6 +99,14 @@ def hybrid_prop_list(self) -> List[int]:
107
99
composite_prop = composite (CompositeFullName , first_name , last_name , doc = "Composite" )
108
100
109
101
102
+ class Article (Base ):
103
+ __tablename__ = "articles"
104
+ id = Column (Integer (), primary_key = True )
105
+ headline = Column (String (100 ))
106
+ pub_date = Column (Date ())
107
+ reporter_id = Column (Integer (), ForeignKey ("reporters.id" ))
108
+
109
+
110
110
class ReflectedEditor (type ):
111
111
"""Same as Editor, but using reflected table."""
112
112
@@ -200,7 +200,6 @@ def hybrid_prop_shopping_cart_item_list(self) -> List[ShoppingCartItem]:
200
200
return [ShoppingCartItem (id = 1 ), ShoppingCartItem (id = 2 )]
201
201
202
202
# Unsupported Type
203
-
204
203
@hybrid_property
205
204
def hybrid_prop_unsupported_type_tuple (self ) -> Tuple [str , str ]:
206
205
return "this will actually" , "be a string"
0 commit comments