I'm not sure that "DTO" is appropriate. A Data Transfer Object was an essential part of
JEE back when EJBs were specialized class objects, but JPA turned them into POJOs, and at that point the need of a separate transfer object to ferry data in and out of the persistence layer became unnecessary since the JPA entity object could serve as its own DTO.
It's very common when working with databases to need to work with graphs of data. By "graph" in mathematical/computer science terms we're talking about a network of interconnected objects, not pie and bar charts. A tree structure, for example is what's known as a directed graph and if it doesn't cross-reference itself, it's further qualified as a Directed Acyclic Graph.
Indeed, the schema of a database is just one big graph, so when we work with part of it what we are actually dealing with is a sub-graph. Regardless, if you have an invoice header, line items and maybe inventory references, and you need to work on them as a
unit, that's a graph. Or, as I sometimes call it, a
working set, which is to say the set of entity objects that I'm going to be working with - adding, deleting, and/or modifiying elements therein, including possibly adjusting their relationships.
When I design a complex app, I have 2 persistence layers. The bottom layer is the Data Access Object (DAO) layer and the classes in it generally perform CRUD and search functions on individual tables. Or sometimes a parent/child set of tables. The layer above that is the Database Logic or Service Layer and it deals with working sets - retrieving, storing, and validating collections of related objects as a unit. Within these 2 layers I am transactional and connected to the database. Above the Service layer is the Business Logic layer, topped by the UI layer. Before passing data to those layers I detach the objects in the working set from the database and end the transaction that was started when the Service Layer method was invoked.
This keeps everything neatly organized. I don't accidentally modify the database in the application layers, since at that point I'm detached. All database operations go through a service method before reaching a DAO, no mater how simple, because a little extra overhead is well paid-for by knowing absolutely that nobody's reaching around corners to do things.
So that is how I can - and frequently do - POST data from multiple database Entity classes.