Closed erycoking closed 2 years ago
FWIW, I was able to reproduce this problem and asked @erycoking to enter this as an issue. For reference, here's the Stack Overflow Q & A. https://stackoverflow.com/questions/71729575/jhipster-import-jdl-error-in-jhipster-monolith-app-when-jdl-has-user-entity-rela
I will take a look
This issue is still there. Is the fix live in the current version? @mraible @mshima
Main branch only.
npm install -g jhipster/generator-jhipster
@mshima Thanks for the quick reply.
I uninstalled the old version by running
npm un -g generator-jhipster
and installed the new version by running
npm install -g jhipster/generator-jhipster
I deleted the old blog
project and reinstalled with the new jhipster version. I added the same app-jdl.jdl and run
jhipster import-jdl app-jdl.jdl
and I am still getting an error
Kindly advice
jhipster import-jdl app-jdl.jdl --prefer-global
JHipster uses locally installed jhipster by default.
@mshima ok. let me try... we inform you if it succeeds
@mshima Awesome, thanks a lot. it succeeded.
Just wondering, what should I do in order for the local one to be the same as the global one
npm install jhipster/generator-jhipster
Thanks
Using jhipster/generator-jhipster creates the entity successfully but fails generating admin app. I am getting bunch of errors ./gradlew
command:
ERROR in ./src/main/webapp/app/shared/error/error-boundary-route.tsx 14:27-33
TS2322: Type '{ render: (props: any) => Element; caseSensitive?: boolean; children?: ReactNode; element?: ReactNode; index?: boolean; path?: string; }' is not assignable to type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.
Property 'render' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.
12 | if (!Component) throw new Error(`A component needs to be specified for path ${(rest as any).path}`);
13 |
> 14 | return <Route {...rest} render={encloseInErrorBoundary} />;
| ^^^^^^
15 | };
16 |
17 | export default ErrorBoundaryRoute;
ERROR in ./src/main/webapp/app/shared/layout/header/header.spec.tsx 42:19-26
TS2322: Type '{ children: Element; history: MemoryHistory; }' is not assignable to type 'IntrinsicAttributes & RouterProps'.
Property 'history' does not exist on type 'IntrinsicAttributes & RouterProps'.
40 | const { container } = render(
41 | <Provider store={store}>
> 42 | <Router history={history}>
| ^^^^^^^
43 | <Header {...props} />
44 | </Router>
45 | </Provider>
I think @types/react-router-dom
does not have type definitions for react-router-dom@6.x.
Any workarounds?
@DanielFran bounty claimed https://opencollective.com/generator-jhipster/expenses/102423
@mshima approved
Overview of the issue
import-jdl command fails when jdl contains a relationship to User entity in applications with webflux that uses sql db with r2dbc
Motivation for or Use Case
Unable to import-jdl for applications with relationship to user entity
Reproduce the error
app-jdl.jdl
) with an entity that has relationship to the user entity e.gentity Post { title String required content TextBlob required date Instant required }
entity Tag { name String required minlength(2) }
entity Product { title String required price BigDecimal required min(0) image ImageBlob }
relationship ManyToOne { Blog{user(login)} to User Post{blog(name)} to Blog }
relationship ManyToMany { Post{tag(name)} to Tag{post} }
paginate Post, Tag with infinite-scroll paginate Product with pagination
jhipster import-jdl app-jdl.jdl