seedstack / crud-addon

Business framework extension to automatically expose CRUD APIs of any DTO.
Mozilla Public License 2.0
0 stars 2 forks source link

Compound Dto's should be supported #1

Open Sherpard opened 6 years ago

Sherpard commented 6 years ago

The current prototype only one to one aggregate -> dto mapping

We should find a way to allow multi-aggregate Dto to be generated automatically.

adrienlauer commented 6 years ago

This is already supported by assemblers which use tuples for this purpose.

I may have constrained the generics signature of the Resource base interface too much. The A parameter should be left without constraint like the Assembler interface. Then we can specialize base classes with two cases: single aggregate and multiple aggregate (using tuples), like BaseAssembler and BaseTupleAssembler.

Sherpard commented 6 years ago

Yep, that was what I tried to point out, we can mark this a desirable feature?

adrienlauer commented 6 years ago

Yes this is desirable!