jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.5k stars 4.02k forks source link

CRUD front-end not generated for embedded entity. #17756

Closed CGarces closed 7 months ago

CGarces commented 2 years ago
Overview of the issue

I'm using the "one-to-many relationship" sample for embedded entities as documented at https://www.jhipster.tech/managing-relationships/#embedded-entities-for-couchbase-and-mongodb

JHipster not generates the CRUD code for the embedded entity.

Just generate the code for "country", and "Region" is included in the model, but not used.

Motivation for or Use Case

Just testing the mongoDB features.

Reproduce the error

generate a monolithic mongoDB project with Angular as front-end

JHipster Version(s)

7.5.0

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "baseName": "testmongo",
    "jhipsterVersion": "7.5.0",
    "skipUserManagement": false,
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "testFrameworks": [],
    "blueprints": [],
    "otherModules": [],
    "pages": [],
    "creationTimestamp": 1643794606492,
    "serviceDiscoveryType": "no",
    "reactive": false,
    "authenticationType": "jwt",
    "packageName": "com.mycompany.myapp",
    "serverPort": "8080",
    "cacheProvider": "no",
    "enableHibernateCache": false,
    "databaseType": "mongodb",
    "devDatabaseType": "mongodb",
    "prodDatabaseType": "mongodb",
    "buildTool": "maven",
    "serverSideOptions": [],
    "websocket": false,
    "searchEngine": false,
    "messageBroker": false,
    "enableSwaggerCodegen": false,
    "clientFramework": "angularX",
    "withAdminUi": false,
    "clientTheme": "none",
    "enableTranslation": false,
    "nativeLanguage": "es",
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "devServerPort": 4200,
    "clientPackageManager": "npm",
    "clientThemeVariant": "",
    "enableGradleEnterprise": false,
    "languages": ["en", "fr"],
    "entities": ["Country", "Region"],
    "lastLiquibaseTimestamp": 1643797299000
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Country {
  countryName String
}
entity Region {
  regionName String
}
relationship OneToMany {
  Country{region} to Region{country}
}

embedded Region

Environment and Tools

java version "11.0.10" 2021-01-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)

git version 2.30.1.windows.1

node: v14.16.0

npm: 6.14.11

Docker version 20.10.11, build dea9396

docker-compose version 1.29.2, build 5becea4c

vrijmetse commented 2 years ago

I guess I am not the only one, I faced the same error with Reactive and Microservices

application {
  config {
    baseName gateway
    applicationType gateway
    authenticationType jwt
    clientFramework react
    prodDatabaseType mongodb
    devDatabaseType mongodb
    databaseType mongodb
    searchEngine elasticsearch
    serviceDiscoveryType no
    buildTool gradle
    cacheProvider hazelcast
    enableSwaggerCodegen true
    reactive true
  }
  entities *
  dto * with mapstruct
}

application {
  config {
    baseName core
    applicationType microservice
    authenticationType jwt
    prodDatabaseType mongodb
    devDatabaseType mongodb
    databaseType mongodb
    serviceDiscoveryType no
    skipUserManagement true
    buildTool gradle
    serverPort 8081
    cacheProvider redis
    enableSwaggerCodegen true
    reactive true
  }
  entities *
  dto * with mapstruct
}

entity Country {
  countryName String
}

@embedded
entity Region {
  regionName String
}

relationship OneToOne {
  Country{region} to Region{country}
}
Frast83 commented 2 years ago

I have the same issue with jhipster 7.8.1 MongoDB and Angular in a monolith project.

CSC-Sendance commented 2 years ago

Facing the same issue for jhipster 7.8.1 MongoDB in a microservice-style application/architecture.

DevGirondin commented 2 years ago

I have the same issue with jhipster 7.9.3 MongoDB and Angular in a monolith project.

sotolou2022 commented 1 year ago
Overview of the issue

I'm using the "one-to-many relationship" sample for embedded entities as documented at https://www.jhipster.tech/managing-relationships/#embedded-entities-for-couchbase-and-mongodb

JHipster not generates the CRUD code for the embedded entity.

Just generate the code for "country", and "Region" is included in the model, but not used.

Motivation for or Use Case

Just testing the mongoDB features.

Reproduce the error

generate a monolithic mongoDB project with Angular as front-end

JHipster Version(s)

7.5.0

JHipster configuration

.yo-rc.json file

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory

JDL entity definitions

Environment and Tools

java version "11.0.10" 2021-01-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)

git version 2.30.1.windows.1

node: v14.16.0

npm: 6.14.11

Docker version 20.10.11, build dea9396

docker-compose version 1.29.2, build 5becea4c

  • [x] Checking this box is mandatory (this is just to show you read everything)

Having a similar issue, was there a resolution found?

AllenSML commented 1 year ago

I have the same issue with jhipster 7.9.3 MongoDB and Angular in a monolith project

HackIntoYourHeart commented 1 year ago

Looks like they don't care about mongodb then right. Because this is an obvious error.

mraible commented 1 year ago

@CrackerJDK94 We do care about MongoDB. We're all volunteers here, and it's possible that no one knows how to fix it. If you know how to fix it, please create a pull request.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

Murik commented 6 months ago

Still the same issue on jhipster 8.2.1. mongoDB with both anfular and vui.