Closed agilob closed 4 years ago
When changed to primitive type @Nullable boolean eagerload
it causes backend to crash and frontend to throw error when list of X-model is visited.
Only some resources (member, user, message resource) are affected by this bug, I have over 20 generated but these 3 failed
[ERROR] /home/agilob/Projects/agileb-jhipster/src/main/java/net/agileb/web/rest/MemberResource.java:[97,39] The route declares a uri variable named [eagerload], but no corresponding method argument is present
[ERROR] /home/agilob/Projects/agileb-jhipster/src/main/java/net/agileb/web/rest/SessionResource.java:[97,40] The route declares a uri variable named [eagerload], but no corresponding method argument is present
[ERROR] /home/agilob/Projects/agileb-jhipster/src/main/java/net/agileb/web/rest/MessageResource.java:[97,40] The route declares a uri variable named [eagerload], but no corresponding method argument is present
This happens when .jdl has
// Set pagination options
paginate Room, Member with infinite-scroll
paginate Session, Message with pagination
// Use Data Transfert Objects (DTO)
// dto * with mapstruct
My classes eg. Room have correct method definition.
I believe the eagerload
was being added to the URI in error. It appears that the only time eagerload
should come into play is if the field contains the owner of a many to many
Overview of the issue
eagerload is not defined on
XResource
methods:Correcting method definition to contains parameter
@Nullable Boolean eagerload
fixes this error.Reproduce the error
I simply generated a new project and it throws this error when I do
./mvnw