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.58k stars 4.02k forks source link

Relationships to User are saved in a microservice architecture, but not rendered #19399

Closed mraible closed 2 years ago

mraible commented 2 years ago
Overview of the issue

Today, I tried my original reactive microservices example from this blog post and everything works as expected. The example is created with v7.0.1 and you can save a blog entity with or without a user and it all works.

Screen Shot 2022-08-10 at 23 42 49 Screen Shot 2022-08-10 at 23 42 53 Screen Shot 2022-08-10 at 23 43 04

If you create this same example with 7.9.2, it saves the relationship to the user, but it does not render it on the list or view screens. Furthermore, Angular does not render the user's login on the list screen.

For more information, see https://github.com/jhipster/generator-jhipster/issues/19342#issuecomment-1208877640 and subsequent comments.

Motivation for or Use Case

This functionality existed in v7.0.1 and therefore should be supported in all 7.x releases.

Reproduce the error
jhipster jdl reactive-ms

Then, start all the Docker containers for the gateway and start it. Start Neo4j for the blog app and start it as well. Log in and navigate to adding a new blog. After you add a new one, you'll see it rendered on the list screen. However, if you navigate to the view or edit screens, the user's login is not displayed.

JHipster Version(s)

7.9.2

JHipster configuration

https://github.com/jhipster/jdl-samples/blob/main/reactive-ms.jdl

mshima commented 2 years ago

That's odd, I will take a look.

mshima commented 2 years ago

@mraible this happens only with Neo4j?

mraible commented 2 years ago

It works with 7.0.1 and Neo4J. I tried using PostgreSQL for both gateway and blog, but couldn't get it to work.

mshima commented 2 years ago

@mraible https://github.com/jhipster/generator-jhipster/pull/19402 fixes the problem for Neo4j, fill free to merge it. Postgres will be more complex. I’ve already done some work on it, but in the process I will do some cleanup at the templates and split into another PR.

mraible commented 2 years ago

@mshima I can confirm this particular issue is fixed by your PR! I confirmed with Vue and Angular. Feel free to close it, or leave it open for PostgreSQL.

mshima commented 2 years ago

Closing since the bug is fixed. I'm planing a follow-up PR targeting v8.

mshima commented 1 year ago

@DanielFran bounty claimed https://opencollective.com/generator-jhipster/expenses/112863.

DanielFran commented 1 year ago

@mshima approved