We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
为何要把OrderStatus加上Id变成实体呢?
The text was updated successfully, but these errors were encountered:
OrderStatus是值对象,但是表现为数据层的实体,这是JPA技术限制。
Sorry, something went wrong.
谢谢回复,可我还是不懂“但是表现为数据层的实体,这是JPA技术限制”这句的含义。回头我再看看视频哈
这句话意思是:数据库是需要主键的,主键是标识,而值对象则是无标识的,那么值对象保存到数据库中是不是一定不能有主键呢,不一定,在DDD中是值对象,但是在数据库中可能就是一个实体数据表,由实体数据表转为的对象称为数据层的实体对象,这个实体对象是DTO或POJO,是贫血对象,与DDD中实体不是一个概念
明白了。感谢
No branches or pull requests
为何要把OrderStatus加上Id变成实体呢?
The text was updated successfully, but these errors were encountered: