You are not logged in.
Hi,
as DDD has not yet been made available to mORMot2, ist there a preferred way to get DDD-classes (based upon TSynAutoCreateFields) filled with data retrieved into TOrm classes?
Regards,
Daniel
Offline
Manual conversion from DDD aggregate to TOrm class is a simple possibility.
Perhaps a bit verbose at first, but if you have one-to-one mapping of the field names you could simply use a temporary JSON conversion.
You could put the conversion methods into the TOrm class definition. In DDD it is OK to have the persistence layer having a dependency with the domain objects.
But don't put the conversion methods into the DDD class: it should stay uncoupled.
Online