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
贡献指南
从这里开始
- 先读完整个 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