generator-jhipster
generator-jhipster copied to clipboard
Search repositories generated for all entities
Overview of the issue
Following up https://github.com/jhipster/generator-jhipster/issues/17142 for a monolith application.
Motivation for or Use Case
Generate search repositories only for entities that has been declared as searchable. So far, from the moment you declare one entity searchable, everything gets searchable
Reproduce the error
See JDL
Related issues
https://github.com/jhipster/generator-jhipster/issues/17142
JHipster Version(s)
7.8.1
JHipster configuration
.yo-rc.json
{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "bug_jhipster_json_properties",
"blueprints": [],
"buildTool": "maven",
"cacheProvider": "no",
"clientFramework": "angularX",
"clientPackageManager": "npm",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1655567508706,
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"devServerPort": 4200,
"dtoSuffix": "DTO",
"enableGradleEnterprise": false,
"enableHibernateCache": false,
"enableSwaggerCodegen": false,
"enableTranslation": false,
"entities": ["A", "B", "C", "D"],
"entitySuffix": "",
"jhiPrefix": "jhi",
"jhipsterVersion": "7.8.1",
"jwtSecretKey": "YjA2MDBmNzNlN2JjZmFkOTk5NmVlYzRjMGI3YmNlMzlmZTMwYTRhNTJhN2VjZjg1YTZhMmVlY2ExZDU1NjgwY2UzMDI4YzllOThjNThjZWY0YTc0YTZiYzczNzZiNWE2MGYzZWU4MGYwY2IyNjM4YzM2YzlmOGIxODg0ZTk0Zjg=",
"languages": ["en", "fr"],
"lastLiquibaseTimestamp": 1655568046000,
"messageBroker": false,
"nativeLanguage": "fr",
"otherModules": [],
"packageName": "com.mycompany.myapp",
"pages": [],
"prodDatabaseType": "postgresql",
"reactive": false,
"searchEngine": "elasticsearch",
"serverPort": "8080",
"serverSideOptions": [],
"serviceDiscoveryType": "no",
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"skipUserManagement": false,
"testFrameworks": [],
"websocket": false,
"withAdminUi": false
}
}
JDL definitions
entity A {
}
entity B {
}
entity C {
}
entity D {
}
relationship ManyToOne {
A{b} to B
B{c} to C
}
search A with elasticsearch
Browsers and Operating System
Windows 10
- [x] Checking this box is mandatory (this is just to show you read everything)
Pinging @ko5tik if you're still interested in that issue
At monoliths and probably microfrontends, search is opt-out @SearchEngine(false).
This behavior is more new comers friendly.
If it is desired I can port this to other parts.
IMO we should stay will current behavior.
Any reason you have in mind?
This behavior is more new comers friendly.
Set the searchEngine and every entity is searchable. This is much easier to new comers.
I don't mind that by default if search engine is set. But other options like dto, service etc. works the very same way I think
We should start v8 cycle soon, so it’s time to discuss. What’s your proposal?
Similar to https://github.com/jhipster/generator-jhipster/issues/17142?
To clarify, proposal:
- If search set but no entities specified then generate for all entities
- If search set and entities specified, only generate for specified entities
Have no use case at the moment - current project does not involve jhipster. But everything is implemented and in pull request - which will of course need. rebasing. My idea was. that entities shall be omitted if indexing is specified to "no". and be indexed bz default
========[] Lines game back in Appstore - check it out! []=============== https://play.google.com/store/apps/details?id=de.pribluda.games.android.lines
Blog: https://www.pribluda.de
On Wed, 14 Sept 2022 at 11:51, Sébastien Lepage @.***> wrote:
To clarify, proposal:
- If search set but no entities specified then generate for all entities
- If search set and entities specified, only generate for specified entities
— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/19023#issuecomment-1246448107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABSUDX6OH45WMFDNUMTFULV6GGZBANCNFSM5Z6ILQMQ . You are receiving this because you were mentioned.Message ID: @.***>
This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days