nested eager loading includes not work
- Dominant language
- PHP
- Stars
- 9.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel|Lumen
| Framework version | 5.8.10
| Package version | 2.2.3
| PHP version | 7.3.3
#### Actual Behaviour
Models:
- Topic —— TopicTransformer `$availableIncludes = ['user'];`
- User;
- Reply —— ReplyTransformer `$availableIncludes = ['user', 'topic'];`
user has many Topics,Tpoic has many replies。when I request `/api/replies?include=topic.user`
only topic eagered,becase those codes :
https://github.com/dingo/api/blob/v2.0.0/src/Transformer/Adapter/Fractal.php#L93-L96
just load topic。
#### Expected Behaviour
`topic.user` will be eagered
#### Steps to Reproduce
There is a public repo: https://github.com/summerblue/larabbs/tree/api
ReplyTransformer:
https://github.com/summerblue/larabbs/blob/api/app/Transformers/ReplyTransformer.php
Contributor guide
Assessment
This issue has not been assessed yet.