Login or sign up Lost password?
Login or sign up
In fact I actually write separate DTO's for my more complex domain models and then you always have manually copy/merge the received data to your domain object. In our scenario the data comes from an external source in XML format (we use JAXB to unmarshal it), and needs to be merged with the one already in the DB. In fact, the major problem is the transfer protocol - the data is coming as a complex deeply nested XML (think of the complete invoice, including information about the customer), so the DIY merge is problematic.