proteanhq/protean

Add support for `List(ValueField(VO))`

Closed this issue · 0 comments

It is an everyday use case to deal with a list of objects. If the objects have unique identities, Aggregates and Entities can use HasMany fields to accomplish this. But simple objects that have a structure but no identity are better expressed as ValueObjects. It would be helpful to add support for maintaining a cluster of VOs as an attribute.

The content of the List will be persisted as a list of dicts, so the field will behave essentially like List(Dict()) when it comes to persistence. However, it will have the added benefit of a validation structure of content within the List.