@@ -90,6 +90,7 @@ class Meta:
90
90
# Composite
91
91
"composite_prop" ,
92
92
# Hybrid
93
+ "hybrid_prop_with_doc" ,
93
94
"hybrid_prop" ,
94
95
"hybrid_prop_str" ,
95
96
"hybrid_prop_int" ,
@@ -157,6 +158,12 @@ class Meta:
157
158
# "doc" is ignored by hybrid_property
158
159
assert hybrid_prop_list .description is None
159
160
161
+ # hybrid_prop_with_doc
162
+ hybrid_prop_with_doc = ReporterType ._meta .fields ['hybrid_prop_with_doc' ]
163
+ assert hybrid_prop_with_doc .type == String
164
+ # docstring is picked up from hybrid_prop_with_doc
165
+ assert hybrid_prop_with_doc .description == "Docstring test"
166
+
160
167
# relationship
161
168
favorite_article_field = ReporterType ._meta .fields ['favorite_article' ]
162
169
assert isinstance (favorite_article_field , Dynamic )
@@ -200,6 +207,7 @@ class Meta:
200
207
composite_prop = ORMField ()
201
208
202
209
# hybrid_property
210
+ hybrid_prop_with_doc = ORMField (description = 'Overridden' )
203
211
hybrid_prop = ORMField (description = 'Overridden' )
204
212
205
213
# relationships
@@ -227,6 +235,7 @@ class Meta:
227
235
"email_v2" ,
228
236
"column_prop" ,
229
237
"composite_prop" ,
238
+ "hybrid_prop_with_doc" ,
230
239
"hybrid_prop" ,
231
240
"favorite_article" ,
232
241
"articles" ,
@@ -268,6 +277,11 @@ class Meta:
268
277
assert hybrid_prop_field .description == "Overridden"
269
278
assert hybrid_prop_field .deprecation_reason is None
270
279
280
+ hybrid_prop_with_doc_field = ReporterType ._meta .fields ['hybrid_prop_with_doc' ]
281
+ assert hybrid_prop_with_doc_field .type == String
282
+ assert hybrid_prop_with_doc_field .description == "Overridden"
283
+ assert hybrid_prop_with_doc_field .deprecation_reason is None
284
+
271
285
column_prop_field_v2 = ReporterType ._meta .fields ['column_prop' ]
272
286
assert column_prop_field_v2 .type == String
273
287
assert column_prop_field_v2 .description is None
@@ -336,6 +350,7 @@ class Meta:
336
350
"email" ,
337
351
"favorite_pet_kind" ,
338
352
"composite_prop" ,
353
+ "hybrid_prop_with_doc" ,
339
354
"hybrid_prop" ,
340
355
"hybrid_prop_str" ,
341
356
"hybrid_prop_int" ,
0 commit comments