Francisco Prado
Francisco Prado

Reputation: 75

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

Upvotes: 1

Views: 156

Answers (1)

Gaël Marziou
Gaël Marziou

Reputation: 16294

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.

Upvotes: 2

Related Questions