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

Support entitySuffix generation #209

Closed
wurst44 opened this issue Mar 24, 2021 · 1 comment · Fixed by #252
Closed

Support entitySuffix generation #209

wurst44 opened this issue Mar 24, 2021 · 1 comment · Fixed by #252
Labels
Feature New feature v2.0.0 Stable version with jhipster 7.0.0
Milestone

Comments

@wurst44
Copy link

wurst44 commented Mar 24, 2021

I use the JDL entitySuffix "NA" (NodeAngular). When using it, the DTOs do not match?

[email protected]
[email protected]

application {
  config {
    baseName all
    packageName com.app.all
    jhiPrefix NA
    serverPort 8080
    entitySuffix NA
    skipClient false		
    skipServer false
    blueprints [nodejs]
    applicationType monolith
    authenticationType jwt 
    clientFramework angularX 
    clientPackageManager npm
    databaseType sql 
    devDatabaseType h2Memory 
    prodDatabaseType postgresql
    buildTool maven 
    cacheProvider hazelcast	
    enableSwaggerCodegen true
    websocket false	
    clientTheme	yeti
    clientThemeVariant dark
  }
  entities *
}
entity Blog {
  name String required minlength(3)
  handle String required minlength(2)
}
entity Post {
  title String required
  content String required
  date Instant required
}
entity Tag {
  name String required minlength(2)
}
relationship ManyToOne {
  Blog{user(login)} to User
  Post{blog(name)} to Blog
}
relationship ManyToMany {
  Post{tag(name)} to Tag{entry}
}
paginate Post, Tag with infinite-scroll
$ cd server
$ npm install
$ npm run build
> [email protected] build /builds/serge/apps/jhipster-generator/server
> npm run clean && tsc -p tsconfig.build.json && npm run copy-resources
> [email protected] clean /builds/serge/apps/jhipster-generator/server
> rimraf dist ../target/db/
src/domain/post.entity.ts(5,10): error TS2305: Module '"./blog.entity"' has no exported member 'Blog'.
src/domain/post.entity.ts(6,10): error TS2305: Module '"./tag.entity"' has no exported member 'Tag'.
src/domain/tag.entity.ts(5,10): error TS2305: Module '"./post.entity"' has no exported member 'Post'.
src/repository/blog.repository.ts(2,10): error TS2305: Module '"../domain/blog.entity"' has no exported member 'Blog'.
src/repository/post.repository.ts(2,10): error TS2305: Module '"../domain/post.entity"' has no exported member 'Post'.
src/repository/tag.repository.ts(2,10): error TS2305: Module '"../domain/tag.entity"' has no exported member 'Tag'.
src/service/blog.service.ts(4,10): error TS2724: Module '"./dto/blog.dto"' has no exported member 'BlogDTO'. Did you mean 'BlogNADTO'?
src/service/blog.service.ts(5,10): error TS2724: Module '"./mapper/blog.mapper"' has no exported member 'BlogMapper'. Did you mean 'BlogNAMapper'?
src/service/dto/post.dto.ts(6,10): error TS2724: Module '"./blog.dto"' has no exported member 'BlogDTO'. Did you mean 'BlogNADTO'?
src/service/dto/post.dto.ts(7,10): error TS2724: Module '"./tag.dto"' has no exported member 'TagDTO'. Did you mean 'TagNADTO'?
src/service/dto/tag.dto.ts(6,10): error TS2724: Module '"./post.dto"' has no exported member 'PostDTO'. Did you mean 'PostNADTO'?
src/service/post.service.ts(4,10): error TS2724: Module '"./dto/post.dto"' has no exported member 'PostDTO'. Did you mean 'PostNADTO'?
src/service/post.service.ts(5,10): error TS2724: Module '"./mapper/post.mapper"' has no exported member 'PostMapper'. Did you mean 'PostNAMapper'?
src/service/tag.service.ts(4,10): error TS2724: Module '"./dto/tag.dto"' has no exported member 'TagDTO'. Did you mean 'TagNADTO'?
src/service/tag.service.ts(5,10): error TS2724: Module '"./mapper/tag.mapper"' has no exported member 'TagMapper'. Did you mean 'TagNAMapper'?
src/web/rest/blog.controller.ts(4,10): error TS2724: Module '"../../service/dto/blog.dto"' has no exported member 'BlogDTO'. Did you mean 'BlogNADTO'?
src/web/rest/post.controller.ts(4,10): error TS2724: Module '"../../service/dto/post.dto"' has no exported member 'PostDTO'. Did you mean 'PostNADTO'?
src/web/rest/tag.controller.ts(4,10): error TS2724: Module '"../../service/dto/tag.dto"' has no exported member 'TagDTO'. Did you mean 'TagNADTO'?

thx guys, like

@ghost
Copy link

ghost commented Mar 25, 2021

Hi @wurst44, thanks for the interest!
In this moment we have not tested the entitySuffix feature, so we have to add the support.

@ghost ghost changed the title Entity generation missmatch when entitySuffix NA? TagDTO'. Did you mean 'TagNADTO'? Support entitySuffix generation Mar 25, 2021
@ghost ghost added the Feature New feature label Mar 25, 2021
@ghost ghost added this to To do in nodejs blueprint via automation Mar 25, 2021
@ghost ghost added this to the 2.0.0 milestone Mar 26, 2021
@ghost ghost added the v2.0.0 Stable version with jhipster 7.0.0 label Mar 26, 2021
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
glutengo added a commit to glutengo/generator-jhipster-nodejs that referenced this issue Sep 5, 2021
- Use asDto and asEntity methods provided by JHipster (this ensures that the entitySuffix and dtoSuffix configOptions are used)
- Fix error where Instant fieldType did not work with sqlite
@ghost ghost closed this as completed in #252 Sep 6, 2021
nodejs blueprint automation moved this from To do to Done Sep 6, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature v2.0.0 Stable version with jhipster 7.0.0
Projects
Development

Successfully merging a pull request may close this issue.

1 participant