roookeee / datus

datus enables you to define a conversion process between two data structures in a fluent functional API
MIT License
41 stars 5 forks source link

Add a helper class for defining mappers for recursive data structures #15

Closed roookeee closed 5 years ago

roookeee commented 5 years ago

I reconsidered adding this functionality to datus as there are quite a few scenarios wherin simple data structures are recursively included in themselfs (parent child relations like categories or products containing more subproduct variants).

There is an utility class outlined in https://github.com/roookeee/datus/blob/master/USAGE.md#advanced-usage--faq to fix this problem. Implementing the given class once (+ unit tests) is far superior to letting users handle it themselves.

Let's add it :)

roookeee commented 5 years ago

Initial implementation done in branch issue-15. Will have to review the changes and documentation before merging into develop (1.2.0-SNAPSHOT).

roookeee commented 5 years ago

As #16 is still open: should I apply PECS here?

roookeee commented 5 years ago

PECS was added in branch issue-15

roookeee commented 5 years ago

Merged into develop