loopbackio / loopbackio/loopback-next
lb4 relation doesn't find models
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 5.1k
- 分支
- 1.1k
- 平均合併
- 2 天 21 小時
- 30 天內合併 PR
- 27
描述
### Describe the bug
I have a project with a lot of models. I organized the models in "sub directories" inside "models" directory.
The "export" is working properly and all the project is working.
What is not working is the possibility to add repositories, relations or anything else
"lb4 relation" stops with an error "Generation is aborted: Error: No models found in ".../src/models"."
I expect the script to be capable to look for models also inside according to what is available in "index.ts" from "models" directory.
### Logs
_No response_
### Additional information
_No response_
### Reproduction
https://github.com/danysz/demo-lb4-cli-model-not-found
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先從 `lb4 relation` 命令和 issue 中連結的重現專案開始,然後檢查它如何掃描 `src/models` 以及如何使用該目錄的 `index.ts`。當組織在子目錄中的模型能夠被發現並用於 relation 或 repository 產生,而不是產生「No models found.」時,這項工作就完成了。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- nodejs, typescript
- 領域
- cli, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100