Open MenAllen opened 2 weeks ago
Can you please provide the exact steps to reproduce the problem? Screenshots or commands executed are the best way for us to help you.
Hello , I followed the documentation: https://www.jhipster.tech/managing-relationships/#a-bidirectional-many-to-one-relationship
A bidirectional one-to-many relationship Let’s start with two entities, a Owner and a Car. A owner can have many cars, and a car can have only one owner.
So this is a one-to-many relationship (one owner has many cars) on one side, and a many-to-one relationship (many cars have one owner) on the other side:
Owner (1) <-----> (*) Car Note that after generating the entity, the generator will inform you that some errors occurred while generating the files. That’s normal as the destination entity has not yet been generated, so you can safely ignore this warning.
We will create the Owner first. Here are the relevant JHipster questions for the Owner:
jhipster entity Owner ... Generating relationships to other entities ? Do you want to add a relationship to another entity? Yes ? What is the name of the other entity? Car ? What is the name of the relationship? car ? What is the type of the relationship? one-to-many ? What is the name of this relationship in the other entity? owner
I think the issue is in the documentation: you can't create an entity with a relationship to another entity not created. I fixed my problem by declaring first Owener without relation ship, then created Car with relationship to Owner, then modified Owner to add the relationship to Car
I think this was fixed with #25564.
You should try to reproduce with the latest version.
Overview of the issue
I want to create two entities Owner and Car (see your documentation) Starting with Owner entity, I create a relation ship with other (non existing yet) entity Car. Your doc says you will have a warning but I got an error and the entity is not created
Motivation for or Use Case
Blocking point for dev
Reproduce the error
systematic error when creating an entity with foreign key
##### JHipster configuration**** INFO! Switching to JHipster installed locally in current project's node repository (node_modules)
ÔûêÔûêÔòù ÔûêÔûêÔòæ ÔûêÔûêÔòöÔòÉÔòÉÔòÉÔûêÔûêÔòæ ÔûêÔûêÔòæ ÔûêÔûêÔòöÔòÉÔòÉÔòÉÔòÉÔòØ ÔòÜÔòÉÔòÉÔòÉÔûêÔûêÔòù ÔûêÔûêÔòæ ÔûêÔûêÔòöÔòÉÔòÉÔòÉÔòØ ÔûêÔûêÔòöÔòÉÔòÉÔûêÔûêÔòæ ÔòÜÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØ ÔûêÔûêÔòæ ÔûêÔûêÔòæ ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔòù ÔûêÔûêÔòæ ÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØ ÔûêÔûêÔòæ ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔòù ÔûêÔûêÔòæ ÔòÜÔûêÔûêÔòù ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòØ ÔòÜÔòÉÔòØ ÔòÜÔòÉÔòØ ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòØ ÔòÜÔòÉÔòØ ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòØ ÔòÜÔòÉÔòØ ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòØ ÔòÜÔòÉÔòØ ÔòÜÔòÉÔòØ https://www.jhipster.tech Welcome to JHipster v7.9.4
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.20.1" 2023-08-24 OpenJDK Runtime Environment Temurin-11.0.20.1+1 (build 11.0.20.1+1) OpenJDK 64-Bit Server VM Temurin-11.0.20.1+1 (build 11.0.20.1+1, mixed mode)
git version 2.40.1.windows.1
node: v18.15.0
npm: 9.4.2
Congratulations, JHipster execution is complete! Sponsored with ÔØñ´©Å by @oktadev.