Skip to content
This repository was archived by the owner on Mar 21, 2021. It is now read-only.

[BUG] Wrong router params when the relationship is between the same entity #438

@Datlyfe

Description

@Datlyfe

I think there is a bug when an entity has a relationship to the same entity .
the id param that is passed to the router link params: {<%= relationshipFieldName %>Id : ...
should be replaced with params: {<%= otherEntityStateName %>Id : .... located in the entity.vue.ejs file otherwise the router will throw missing param for named route "${entity}View" warning.
you can test this by importing this jdl file https://github.com/jhipster/jdl-samples/blob/master/simple-online-shop.jh#L42
you will notice that the route param for the parent field is set to parentId : category.parent.id insted of categoryId : category.parent.id
this issue does not exist when importing this jdl file in an Angular/React jhipster generated application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions