简体   繁体   中英

How to put @beanmapping ignored by default to false from JDL

I'm trying to generate my entities and dtos from a JDL file, and I need that mapper files put @BeanMapping(ignoreByDefault=false) for recovering all the properties of a relationship's dto and not only the id. But when I generate dtos from JDL file ignoredByDefault is set to true. Is there any way to change this behaviour?

What I got in my jdl file (after my entities and relationships parts) is:

dto * with mapstruct

No, there's no way as you can easily find out by looking at the EntityMapper template in generator's code: this line is not conditional at all.

So, the easy way is to modify generated code manually, the hard way would be to write a blueprint but it seems overkill.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM