I think the use cases outlined here are good. Does it also make sense to add something for the cases where DTO Record <-> Entity assembly happens outside the direct EntityManager context? Basically I am thinking of a generic utility that formalizes the Assembler Pattern in JPA. The utility could be a part of JPA itself or something that is part of DeltaSpike. The following are some casual examples representing very simple implicit transformation cases.
MyRecord myRecord = JpaDtoAssembler.toRecord(myEntity, MyRecord.class);
...
MyEntity myEntity = JpaDtoAssembler.toEntity(myRecord, MyEntity.class);
Reza Rahman
Jakarta EE Ambassador, Author, Blogger, Speaker
Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.
I think the use cases outlined here are good. Does it also make sense to add something for the cases where DTO Record <-> Entity assembly happens outside the direct EntityManager context? Basically I am thinking of a generic utility that formalizes the Assembler Pattern in JPA. The utility could be a part of JPA itself or something that is part of DeltaSpike. The following are some casual examples representing very simple implicit transformation cases.
Reza Rahman
Jakarta EE Ambassador, Author, Blogger, Speaker
Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.