Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想保存两个实体的差异。旧实体的 id 女巫不为空。新的 id 有一个空值,所以我将它们作为 valueObject 进行比较。问题是 ValueChange 确实保存了差异,但没有保存旧的 id。我怎么能做到这一点?
对于 Entities,Id 属性不能为 null,因此需要将此类映射为 ValueObject。如果是这样,Id 属性将被视为常规属性,它不会转到此对象的 GlobalId。