FFFF
Skip to content

EntityMapper should be invoked from EntityResource only even if EntityService is present #3175

@lordlothar99

Description

@lordlothar99
Overview of the issue

[Enhancement] EntityMapper should be invoked from EntityResource only even if EntityService is present

Motivation for or Use Case

In my point of view, EntityService shouldn't bother with DTO <-> Entity conversion, that's only EntityResource responsibility. EntityService should only see entities, and not make any reference to rest package

JHipster Version(s)

2.27.0

JHipster configuration, a .yo-rc.json file generated in the root folder

Example :

{
  "generator-jhipster": {
    "applicationType": "monolith",
    "baseName": "sampleDefaultFromScratch",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": "no",
    "websocket": "no",
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": "no",
    "useSass": false,
    "buildTool": "maven",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": ["en", "fr"],
    "enableSocialSignIn": false,
    "rememberMeKey": "f19f0827c622eb9b81f5227a869ccd44932d78eb",
    "testFrameworks": [
      "gatling"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
{
    "relationships": [],
    "fields": [
        {
            "fieldName": "label",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "minlength"
            ],
            "fieldValidateRulesMinlength": "3"
        }
    ],
    "changelogDate": "20150805124936",
    "dto": "mapstruct",
    "pagination": "pagination",
    "service": "serviceClass"
}
Suggest a Fix

I can submit a PR for that

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0