Here's a link to a default template that you could copy some things from: https://github.com/apache/cayenne/blob/master/cayenne-cgen/src/main/resources/templates/v1_2/singleclass.vm
On Tue, Sep 17, 2019 at 4:29 PM John Huss <johnth...@gmail.com> wrote: > It's a small effort to create a custom entity template to generate any > kind of entity class you want, for instance for a DTO. You can copy a lot > of stuff right out of the regular templates if you want. > > Then you can use maven or ant to easily regenerate those classes the same > way CayenneModeler does without having to change the custom template > selections all the time. > > On Tue, Sep 17, 2019 at 1:49 PM Tony Giaccone <t...@giaccone.org> wrote: > >> So typically I create a Data Transfer Object to return values across the >> wire that I have fetched and copy attributes from my model object to the >> DTO. This gets tedious quickly. I wondered if there's not another way >> that people are doing this, because this seems entirely too painful. >> >> However, if* this is* what most people do, then perhaps a change could be >> made to the modeler, that would all you to create automatically a set of >> DTO objects with when you generate the model objects. I recognize that >> this would be a rather significant effort and I'm guessing that there's >> probably a better way, but I'm not aware of what it is. >> >> Any suggestions? >> >> >> Tony Giaccone >> >