File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,20 +56,6 @@ user = await user_crud.select_model(
5656)
5757```
5858
59- ### 嵌套关系
60-
61- ``` python
62- # 加载嵌套关系
63- users = await user_crud.select_models(
64- session,
65- load_strategies = {
66- ' posts' : ' selectinload' ,
67- ' posts.category' : ' joinedload' ,
68- ' posts.comments' : ' selectinload'
69- }
70- )
71- ```
72-
7359## join_conditions 参数
7460
7561### 基础 JOIN
@@ -439,16 +425,16 @@ users = await user_crud.select_models(
439425)
440426```
441427
442- ### 过深的嵌套
428+ ### 嵌套关系
443429
444430``` python
445- # 避免:过深的嵌套关系
431+ # 当前不支持嵌套关系
446432users = await user_crud.select_models(
447433 session,
448434 load_strategies = {
449435 ' posts' : ' selectinload' ,
450- ' posts.comments' : ' selectinload' ,
451- ' posts.comments.author' : ' selectinload' , # 过深
436+ ' posts.comments' : ' selectinload' , # error
437+ ' posts.comments.author' : ' selectinload' , # error
452438 }
453439)
454440```
You can’t perform that action at this time.
0 commit comments