-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column type for foreign key field empty when adding ManyToOne relationship with incremental changelogs #15401
Comments
This issue is stale because it has been open 30 days with no activity. |
@pascalgrimaud I have the same issue, please reopen. See my sample app. |
This issue is stale because it has been open 30 days with no activity. |
Keep it open please. |
This issue is stale because it has been open 30 days with no activity. |
The issue also persists in 7.4.0. |
This issue is stale because it has been open 30 days with no activity. |
I still don't get the thing about this 'incremental changelog' feature, when we have the liquibase-maven-plugin that is maintained by the liquibase community thus bullet proof... Usage of the liquibase-maven-plugin:
I think that we could wrap this workflow into a
I know that it would be a little bit painful to implement, but we won't have to maintain our changelog's code anymore (or maybe just the part that updates the |
@Tcharl Should we leave this issue open? |
@mraible yes please leave it open. I have been debugging this today and the issue seems to come from:
When an entity is added by specifying only and exactly one side:
NOT
or
it causes jhipster to not see that B has a new relationship, and not calling prepareFakeData on it, which causes the csv (and depending on the version other stuff) to be broken. EDIT: generate first with the 2 sides, then regenerate after removing a side if you don't want it |
This issue is stale because it has been open for too long without any activity. |
Overview of the issue
I have an existing project with multiple entities and incremental changelogs enabled. I'm attempting to add a new entity with unidirectional ManyToOne relationships to the existing entities, however, the generator is not filling in the "type" attribute for the column definition correctly. It is empty resulting in liquibase errors later. In the example case, the type value should be "bigint" but is instead empty ("").
Motivation for or Use Case
I would like to add new entities and with unidirectional relationships to an existing project.
Reproduce the error
This project was generated with jhipster using:
It's a monolith with default selections and mariadb. I created two entities by importing the following test.jdl (found in the project root).
To reproduce the issue, add the following to the JDL:
Then re-import:
You will see that the column type is null:
Related issues
N/A
Suggest a Fix
I currently manually set the column types after the import to work around the issue.
JHipster configuration
INFO! Using JHipster version installed locally in current project's node_modules
Welcome to the JHipster Information Sub-Generator
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.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.10)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.10, mixed mode, sharing)
git version 2.27.0
node: v12.18.2
npm: 7.13.0
Docker version 20.10.2, build 20.10.2-0ubuntu1~20.10.1
docker-compose version 1.25.0, build unknown
No change to package.json was detected. No package manager install will be executed.
Congratulations, JHipster execution is complete!
Entity configuration(s)
entityName.json
files generated in the.jhipster
directorySee attached.
Browsers and Operating System
Linux pop-os 5.11.0-7614-generic #15
161862669320.10~ecb25cd-Ubuntu SMP Thu Apr 22 16:00:45 UTC x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: