Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对于实体行为如何理解,或者说entity可以直接调用gateway吗 #374

Open
null23 opened this issue Nov 26, 2022 · 1 comment

Comments

@null23
Copy link

null23 commented Nov 26, 2022

举例:创建一个活动配置,那么创建活动配置(save)这个行为,可以定位在活动对应的entity吗,如果这个活动entity有save这个行为,那是不是要在entity中调用gateway?
我有这个疑问,是因为看到官方demo,把类似于save的行为放进了application这层,在application去调用gateway提供的save,而不是在活动实体内部提供这个save的行为并且由实体本身去调用gateway。
这个问题要怎么看待呢?

@duguyixiaono1
Copy link

可以参考下充血模型与富血模型的区别

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants