Skip to content
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

Vue: Blank Parent column in Child entity list for both one-to-one and many-to-one relationships #25846

Open
1 task
vw98075 opened this issue Apr 14, 2024 · 7 comments · May be fixed by #25876
Open
1 task
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: vue $100 https://www.jhipster.tech/bug-bounties/

Comments

@vw98075
Copy link
Contributor

vw98075 commented Apr 14, 2024

Overview of the issue

For an one-to-one relationship:

@service(serviceClass)
entity Parent {
    name String required
}

@service(serviceClass)
entity Child {
    name String required
}

relationship OneToOne {
    Child{parent(name)} to @Id Parent{child(name)}
}

and a many-to-one relationship:

@service(serviceClass)
entity Parent {
    name String required
}

@service(serviceClass)
entity Child {
    name String required
}

relationship ManyToOne {
    Child{parent(name)} to Parent{child(name)}
}

The parent column of a Child entity list is blank although the field isn't blank on both view and edit pages.

Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)

8.3

JHipster configuration
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "manyToOne",
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "clientFramework": "vue",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1713067956252,
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "devServerPort": 9060,
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": false,
    "entities": ["Parent", "Child"],
    "feignClient": null,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.3.0",
    "jwtSecretKey": "...",
    "lastLiquibaseTimestamp": 1713068387000,
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "en",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [],
    "serviceDiscoveryType": false,
    "syncUserWithIdp": null,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@qmonmert qmonmert linked a pull request Apr 16, 2024 that will close this issue
6 tasks
@qmonmert
Copy link
Contributor

@DanielFran I confirm bug

@vw98075 can you try #25876 ?

@DanielFran DanielFran added area: bug 🐛 $100 https://www.jhipster.tech/bug-bounties/ $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: vue and removed area: triage theme: undefined labels Apr 17, 2024
@mraible
Copy link
Contributor

mraible commented Apr 29, 2024

I'm not sure this is related, but I'm seeing a similar issue in my jhipster8-demo project. If I clone the project, run rm -rf *, and recreate it from the main branch with jhipster, the user column is not populated when I view the blog listing.

Screenshot 2024-04-29 at 2 12 22 PM

If you look at the screenshot in the tutorial for this project, the user was rendered in 8.1.0.

image

@mraible
Copy link
Contributor

mraible commented Apr 29, 2024

Nevermind, the reason there's no user listed is because there is no user assigned by Faker. It works as expected with the main branch if I modify the data.

Screenshot 2024-04-29 at 2 16 12 PM

@qmonmert
Copy link
Contributor

@mraible working also when you view and edit?

@mraible
Copy link
Contributor

mraible commented Apr 29, 2024

@qmonmert Yes.

@qmonmert
Copy link
Contributor

@mraible ok it works on Angular but not with Vue

@mraible
Copy link
Contributor

mraible commented Apr 29, 2024

@qmonmert I changed the project to use Vue and it seems to work as expected.

Screenshot 2024-04-29 at 2 29 51 PM

React works too.

Screenshot 2024-04-29 at 2 33 49 PM

Maybe this issue is about something other than the relationships I have in my project? Here's the JDL that jhipster8-demo uses:

entity Blog {
  name String required minlength(3)
  handle String required minlength(2)
}

entity Post {
  title String required
  content TextBlob required
  date Instant required
}

entity Tag {
  name String required minlength(2)
}

relationship ManyToOne {
  Blog{user(login)} to User with builtInEntity
  Post{blog(name)} to Blog
}

relationship ManyToMany {
  Post{tag(name)} to Tag{post}
}

paginate Post, Tag with infinite-scroll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: vue $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants