The CyberMaid
The CyberMaid
我也请教一下,如果我想实现标注某些model使用另一个数据源,我是在这个里面配置吗? 
> 你是希望,有一部分的model就一直使用其专用的数据源 ↑,这个,目前我的想法是application.yaml定义多个数据源(驱动都为MySQL),然后指定Model使用某个数据源进行读写。 我暂时没有md教程里那种业务多库场景。后续可能会实现pgsql和hive方言,然后也采取专用的模式。
 我实现了一个实例,但是我Model重写该返回啥还是有点懵  我看了这位老哥的代码,不太想又Wrap一层
我在baseModel中这么操作了下:     目前实现了我的需求,谢谢大佬答疑 感觉之后就是实现Builder,在Model一换,在Config一加就行了
I've defined a [#naming-strategy](https://lucid.adonisjs.com/docs/model-naming-strategy#naming-strategy), but I can't switch the namingStrategy used by the model during runtime Here's my namingStrategy: ```ts import { CamelCaseNamingStrategy } from '@adonisjs/lucid/orm' import type { LucidModel...
That's the case, if I define different models, I need double the workload. But they are just different naming strategies between them, the association relationships are all the same. I...
Then dynamically import based on certain conditions? I'm also thinking along these lines, but I feel it's not as convenient as changing namingStrategy, because I still have to define an...
And I mainly wanted to verify if my approach is feasible, it seems like you prefer the OOP way more
Unfortunately, I tried the inheritance approach. I found it doesn't work: even when I defined and used namingStrategy, the model still seems to follow the parent model's declare, unless I...