CCMiResearch / DasContract

A visual language to define contracts between people, companies, and governments.
MIT License
5 stars 8 forks source link

DasContract.Abstraction.Data.Property property bad design #9

Open drozdik-m opened 4 years ago

drozdik-m commented 4 years ago

Property Entity of a class DasContract.Abstraction.Data.Property has a comment:

A linked entity in case of Type=PropertyType.Entity.

I consider this a bit of bad design. If this property is only usable in some use cases, then this should be designed as two different classes. For example, EntityProperty and EntityReference/EntityPropertyReference, where the EntityPropertyReference contains this extra property. Polymorphism with simple inheritance should suffice.

IamMarek commented 4 years ago

I do agree.