Abp: FullAuditedAggregateRootWithUser generic type wrong constraint

Created on 13 Jan 2020  Â·  7Comments  Â·  Source: abpframework/abp

Most helpful comment

I suppose that is because FullAuditedAggregateRootWithUser was committed on 14 Mar 2018 (https://github.com/abpframework/abp/commit/2339fab33770417a0c80b873d3182fb5345a98f9#diff-88bc7789a4b0b95478b3bb69f9f1fc29), before @hikalkan decided to go with Guid for TKey of IUser on 20 Jun 2018 (https://github.com/abpframework/abp/commit/745d891134da81de8fa88e8851f085f4eeb03b91#diff-99e4bec2857b169bc53dbd6d309560c4).

FullAuditedAggregateRootWithUser may have been overlooked because it is not used anywhere (https://github.com/abpframework/abp/search?q=FullAuditedAggregateRootWithUser) and the two classes are in different projects — FullAuditedAggregateRootWithUser in the framework and IUser in the users module.

I believe we should update it in FullAuditedAggregateRootWithUser.

All 7 comments

I am also confused about this.

@hikalkan can you explain it. Thanks.

I suppose that is because FullAuditedAggregateRootWithUser was committed on 14 Mar 2018 (https://github.com/abpframework/abp/commit/2339fab33770417a0c80b873d3182fb5345a98f9#diff-88bc7789a4b0b95478b3bb69f9f1fc29), before @hikalkan decided to go with Guid for TKey of IUser on 20 Jun 2018 (https://github.com/abpframework/abp/commit/745d891134da81de8fa88e8851f085f4eeb03b91#diff-99e4bec2857b169bc53dbd6d309560c4).

FullAuditedAggregateRootWithUser may have been overlooked because it is not used anywhere (https://github.com/abpframework/abp/search?q=FullAuditedAggregateRootWithUser) and the two classes are in different projects — FullAuditedAggregateRootWithUser in the framework and IUser in the users module.

I believe we should update it in FullAuditedAggregateRootWithUser.

@acjh you are right. FullAuditedAggregateRootWithUser classes have never been used and forgotten :) I will update them.

BTW, we don't suggest to use this base class since it breaks one of the Aggregate design rules: "Don't add navigation properties between aggregates, use Id instead".

But you know not everyone has to perfectly design DDD based apps. If you are using EF Core, it is a common habit to add such navigation properties.

Thanks for the extra explanation about DDD :) @hikalkan

You're welcome :)

Was this page helpful?
0 / 5 - 0 ratings