orientechnologies/orientdb-docs 50
Repository of the entire OrientDB documentation.
Azure Container Service Engine - a place for community to collaborate and build the best open Docker container infrastructure for Azure.
nagarajasr/angular-schema-form 0
Generate forms from a JSON schema, with AngularJS!
The Microsoft Bot Builder SDK is one of three main components of the Microsoft Bot Framework. The Microsoft Bot Framework provides just what you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/SMS to Skype, Slack, Office 365 mail and other popular services.
Define and run complex applications using Docker
Build: Root of the build system
A set of vim, zsh, git, and tmux configuration files.
Convert a JSON Object to JSON Schema, Mongoose Schema, or a Generic template for quick documentation / upstart.
nagarajasr/generator-jhipster 0
Open Source application generator for creating Spring Boot + Angular/React projects in seconds!
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
PR opened jhipster/generator-jhipster
Migrate react to use i18n hash instead of build timestamp. <!-- PR description. -->
Please make sure the below checklist is followed for Pull Requests.
- [ ] All continuous integration tests are green
- [ ] Tests are added where necessary
- [ ] The JDL part is updated if necessary
- [ ] jhipster-online is updated if necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.
<!-- Please also reference the issue number in a commit message to automatically close the related GitHub issue
Note: It is also possible to add [skip ci] or [ci skip] to your commit message to skip continuous integration tests
-->
pr created time in 17 minutes
PR opened jhipster/generator-jhipster
<!-- PR description. -->
Please make sure the below checklist is followed for Pull Requests.
- [ ] All continuous integration tests are green
- [ ] Tests are added where necessary
- [ ] The JDL part is updated if necessary
- [ ] jhipster-online is updated if necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.
<!-- Please also reference the issue number in a commit message to automatically close the related GitHub issue
Note: It is also possible to add [skip ci] or [ci skip] to your commit message to skip continuous integration tests
-->
pr created time in 20 minutes
PR opened jhipster/generator-jhipster
Problem: when executing jdl with a custom blueprint option (from app generator) like jhipster jdl microservice.jdl --blueprints kotlin --skip-ktlint-format, jdl command with fork serializes options back to cli options and executes deployments generators using cli with every option, causing an unknown option error.
Fork is supposed to run multiples generators in parallel making it faster, but deployments are small and will not have a big impact on the execution time.
Drop fork support for deployments, preventing the unknown option error.
Closes https://github.com/jhipster/generator-jhipster/issues/14870. <!-- PR description. -->
Please make sure the below checklist is followed for Pull Requests.
- [ ] All continuous integration tests are green
- [ ] Tests are added where necessary
- [ ] The JDL part is updated if necessary
- [ ] jhipster-online is updated if necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.
<!-- Please also reference the issue number in a commit message to automatically close the related GitHub issue
Note: It is also possible to add [skip ci] or [ci skip] to your commit message to skip continuous integration tests
-->
pr created time in an hour
issue commentjhipster/generator-jhipster
StackOverflowError with multiple entity relations when elastic is enabled
Keep it open.
comment created time in 3 hours
pull request commentformium/formik
Include FormikState in onReset/onSubmit callback
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue closedformium/formik
[Feature request] UX improvement: reset field error onChange
🚀 Feature request
Below is my feature request, please let me know what you think about it, I would be happy to work on that in case you are interested :)
Current Behavior
If you set up a Formik form with:
validateOnChange: false,
valdiateOnBlur: false,
then the validations only run upon submission. But then when the user edits the form values again to correct their mistakes, the errors will still persist until next submission unless you write a custom solution as detailed below, which can be frustrating as the new values can be valid but still showing an error message until submitted.
Desired Behavior
It would be nice to have for ex. an additional boolean config option to automatically reset individual field error on change when validation is set-up to run only at submit. This would by default improve the UX and remove the need for specific consumer code to handle that behaviour.
Suggested Solution
My current consumer workaround is to wrap Formik's change handler in a custom function to achieve that:
const handleChangeWrapper = (e) => {
setFieldError(e.target.name, undefined) // <- reset error on the field
handleChange(e); // <- call original Formik's change handler
}
A possible solution on the lib would be to expose an additional config option such as:
resetErrorOnChange: boolean
The tricky bit is that should only apply if validateOnChange and validateOnBlur are set to false, so maybe there is a better way to make this clearer.
Who does this impact? Who is this for?
All users.
Describe alternatives you've considered
N/A
Additional context
Here is a CodeSandbox showing the before/after behaviours: https://codesandbox.io/s/formik-reset-error-on-change-1uf8t?file=/src/App.js
closed time in 3 hours
ClementParis016pull request commentformium/formik
Skip setValues side effects if returned value is unchanged
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue commentformium/formik
validateOnMount not working when enableReinitialize is true
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
pull request commentformium/formik
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue commentformium/formik
Formik should not eat up all the errors, without passing them a long
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue commentjhipster/generator-jhipster
jhipster.github.io website design update
This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days
comment created time in 3 hours
issue commentformium/formik
Urgent! Removable console warn
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue commentjhipster/generator-jhipster
Update Open-api generator version to 5.x
This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days
comment created time in 3 hours
issue commentformium/formik
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
comment created time in 3 hours
issue commentjhipster/generator-jhipster
StackOverflowError with multiple entity relations when elastic is enabled
This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days
comment created time in 3 hours
issue commentjhipster/generator-jhipster
partialUpdate with reactive/webflux and elasticsearch does not update elasticsearch
This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days
comment created time in 3 hours
issue commentformium/formik
[V2] useFormikContext doesn't return valitationSchema as expected
Hi there,
I connect my component but when checking for errors, it always returns an empty object.
const MySchema = Yup.object().shape({
username: Yup.string().trim().required(`Cannot be left blank`),
});
const MyForm = () => {
const formik = useFormik({
initialValues: {
username: '',
},
validationSchema: MySchema,
...
});
return <Formik {...formik}>
<Form>
<MyComponent />
</Form>
</Formik>
}
const MyComponent = ({ formik: { errors }}) => {
console.log('xxx', errors);
return <input id="username" name="username" ..../>;
}
export default connect(MyComponent)
However, when I console.log(formik), it does return errors. Last but not least, when I type in a username and console log again formik, the errors still contain an error message regarding the username field...
Not sure what I am missing here...
Thanks any help!
comment created time in 4 hours
Pull request review commentjhipster/generator-jhipster
Migrate compare to github actions.
jobs: - ngx-gradle-mongodb-kafka-cucumber - ngx-gradle-h2disk-ws-nocache include:- - app-type: ngx-default+ - app-sample: ngx-default entity: sqlfull environment: prod war: 0 e2e: 1 testcontainers: 1- sonar-analyse: 1
No switch to sonar-analyse: 0 at the additional bellow.
comment created time in 5 hours
Pull request review commentjhipster/generator-jhipster
Migrate compare to github actions.
jobs: - ngx-gradle-mongodb-kafka-cucumber - ngx-gradle-h2disk-ws-nocache include:- - app-type: ngx-default+ - app-sample: ngx-default entity: sqlfull environment: prod war: 0 e2e: 1 testcontainers: 1- sonar-analyse: 1
@mshima Did you remove sonar-analyse = '1' by mistake?
comment created time in 5 hours
pull request commentformium/formik
add validationSchema to FormikContext
Hello! Any news on this? Thanks!
comment created time in 5 hours
issue commentformium/formik
[V2] useFormikContext doesn't return valitationSchema as expected
Hello! Any news on this? Thanks!
comment created time in 5 hours
PR opened jhipster/generator-jhipster
Closes https://github.com/jhipster/generator-jhipster/issues/15129. <!-- PR description. -->
Please make sure the below checklist is followed for Pull Requests.
- [ ] All continuous integration tests are green
- [ ] Tests are added where necessary
- [ ] The JDL part is updated if necessary
- [ ] jhipster-online is updated if necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.
<!-- Please also reference the issue number in a commit message to automatically close the related GitHub issue
Note: It is also possible to add [skip ci] or [ci skip] to your commit message to skip continuous integration tests
-->
pr created time in 6 hours
issue commentjhipster/generator-jhipster
Microfront End Fails To Generate Gateway
I tried to include my jdl.
deployment { deploymentType docker-compose, appsFolders [ frontend, item, estimating, profitability ], directoryPath "../" dockerRepositoryName "rdsidenow", gatewayType zuul, monitoring prometheus }
application { config { applicationType gateway, baseName frontend, packageName com.rdsidenow.frontend, serverPort 8080, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, messageBroker kafka, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], clientFramework angularX, jhiPrefix jhi, dtoSuffix DTO } entities * }
application { config { applicationType microservice, baseName profitability, packageName com.rdsidenow.profitability, serverPort 8081, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities Profitability, Transaction }
application { config { applicationType microservice, baseName estimating, packageName com.rdsidenow.estimating, serverPort 8082, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities Estimate, EstimateLineItem, EstimateItem }
application { config { applicationType microservice, baseName item, packageName com.rdsidenow.item, serverPort 8083, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities ServiceOption, FeeOption }
entity Profitability { orderId String unique required, estBillTotal Long, estInvoiceTotal Long, billPaymentTotal Long, invoicePaymentTotal Long, estNetAmount Long, actNetAmount Long, profitable Boolean }
entity Transaction { orderId String required, invoiceId String , billId String , transactionType TransactionType, amount Long }
enum TransactionType { BILL_ESTIMATE, INVOICE_ESTIMATE, BILL_PAYMENT, INVOICE_PAYMENT }
entity Estimate { orderId String required, type EstimateType required, status EstimateStatus required, addTax Boolean, taxRate Integer min (0) max(100), subTotal Integer required, taxAmount Integer required, total Integer required }
enum EstimateStatus { OPEN, CLOSED, VOID }
enum EstimateType { INVOICE, BILL }
entity EstimateLineItem { unitPrice Long required, unit EstimateUnitType required, quantity Long required, discountQuantity Long required, addTax Boolean, limitType EstimateLimitType required, limitValue Long required, taxRate Long min (0) max(100), subTotal Long required, taxAmount Long required, total Long required }
enum EstimateLimitType { MILES, DOLLARS }
entity EstimateItem { name String unique required, rate Long required, discountQuantity Long, minQuantity Long, serviceOptionId String, feeOptionId String, unit EstimateUnitType required, isActive Boolean, deactivationDate Instant, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum EstimateUnitType { FLAT, PER_GALLON, PER_HOUR, PER_MILE, PER_DAY }
entity ServiceOption { name String unique required, groupType ServiceGroupType required, serviceType BasicServiceType required, unit ServiceUnitType required, vehicleClass ServiceVehicleClass required, rate Long required, minQuantity Long, deactivationDate Instant, isActive Boolean, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum ServiceGroupType { NON_SALVAGE, SALVAGE }
enum BasicServiceType { TOW, BATTERY, FLUID_DELIVERY, RIDE_SHARE, LOCKOUT, LOCKSMITH, WINCH_OUT, TIRE_CHANGE }
enum ServiceVehicleClass { LIGHT, MEDIUM, HEAVY, CYCLE }
enum ServiceUnitType { FLAT, PER_HOUR }
entity FeeOption { name String unique required, feeType BasicFeeType required, unit FeeUnitType required, rate Long required, discountQuantity Long, minQuantity Long, isActive Boolean, deactivationDate Instant, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum FeeUnitType { FLAT, PER_GALLON, PER_HOUR, PER_MILE, PER_DAY }
enum BasicFeeType { FUEL, PREMIUM, CANCELLATION, CREDIT_CARD_PROCESSING, CLEAN_UP, FUEL_SURCHARGE, IDLE_TIME, MILES_TO_DESTINATION, MILES_TO_ORIGIN, RETURN_MILES, WINCHING, LABOR, STORAGE }
relationship OneToMany { Estimate to EstimateLineItem{estimate required} }
relationship ManyToOne { EstimateLineItem{estimateItem(name)} to EstimateItem } paginate * with pagination dto * with mapstruct filter *
comment created time in 6 hours
issue openedjhipster/generator-jhipster
Microfront End Fails To Generate Gateway
Overview of the issue
running jhipster jdl filename.jdl --microfrontend generates the micro services but does not generate the gateway.
I receive the following error
Error running generator app: TypeError: /usr/local/lib/node_modules/generator-jhipster/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs:38 36| <%_ if (applicationTypeGateway) { _%> 37| remotes: {
38| <%_ for (microserviceName of Object.keys(jhipsterConfig.applications)) { %> 39| '<%= microserviceName %>':
<%= microserviceName %>@${targetOptions.target !== 'serve' ? '/services/<%= microserviceName %>' : 'http://localhost:<%= jhipsterConfig.applications[microserviceName].applicationIndex + devServerBasePort %>'}/remoteEntry.js, 40| <% } _%> 41| },
Cannot convert undefined or null to object TypeError: /usr/local/lib/node_modules/generator-jhipster/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs:38 36| <%_ if (applicationTypeGateway) { _%> 37| remotes: {
38| <%_ for (microserviceName of Object.keys(jhipsterConfig.applications)) { %> 39| '<%= microserviceName %>':
<%= microserviceName %>@${targetOptions.target !== 'serve' ? '/services/<%= microserviceName %>' : 'http://localhost:<%= jhipsterConfig.applications[microserviceName].applicationIndex + devServerBasePort %>'}/remoteEntry.js, 40| <% } _%> 41| },
Cannot convert undefined or null to object at Function.keys (<anonymous>) at JHipsterClientGenerator.eval (eval at compile (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:662:12), <anonymous>:37:40) at webpack.microfrontend.js (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:692:17) at /usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:258:40 at new Promise (<anonymous>) at tryHandleCache (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:256:14) at Object.exports.renderFile (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:489:10) at Object.renderContent (/usr/local/lib/node_modules/generator-jhipster/generators/utils.js:296:23) at JHipsterClientGenerator.template (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-private.js:822:26) at /usr/local/lib/node_modules/generator-jhipster/generators/generator-base.js:2223:47 { path: '/usr/local/lib/node_modules/generator-jhipster/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs' } ERROR! /usr/local/lib/node_modules/generator-jhipster/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs:38 36| <%_ if (applicationTypeGateway) { _%> 37| remotes: {
38| <%_ for (microserviceName of Object.keys(jhipsterConfig.applications)) { %> 39| '<%= microserviceName %>':
<%= microserviceName %>@${targetOptions.target !== 'serve' ? '/services/<%= microserviceName %>' : 'http://localhost:<%= jhipsterConfig.applications[microserviceName].applicationIndex + devServerBasePort %>'}/remoteEntry.js, 40| <% } _%> 41| },
Cannot convert undefined or null to object TypeError: /usr/local/lib/node_modules/generator-jhipster/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs:38 36| <%_ if (applicationTypeGateway) { _%> 37| remotes: {
38| <%_ for (microserviceName of Object.keys(jhipsterConfig.applications)) { %> 39| '<%= microserviceName %>':
<%= microserviceName %>@${targetOptions.target !== 'serve' ? '/services/<%= microserviceName %>' : 'http://localhost:<%= jhipsterConfig.applications[microserviceName].applicationIndex + devServerBasePort %>'}/remoteEntry.js, 40| <% } _%> 41| },
Cannot convert undefined or null to object at Function.keys (<anonymous>) at JHipsterClientGenerator.eval (eval at compile (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:662:12), <anonymous>:37:40) at webpack.microfrontend.js (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:692:17) at /usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:258:40 at new Promise (<anonymous>) at tryHandleCache (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:256:14) at Object.exports.renderFile (/usr/local/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:489:10) at Object.renderContent (/usr/local/lib/node_modules/generator-jhipster/generators/utils.js:296:23) at JHipsterClientGenerator.template (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-private.js:822:26) at /usr/local/lib/node_modules/generator-jhipster/generators/generator-base.js:2223:47 {
Motivation for or Use Case
trying to use the new microfrontend feature
Reproduce the error
run jhipster jdl samplemicrofrontend.jh --microfrontend
Related issues
<!-- Has a similar issue been reported before? Please search both closed & open issues -->
Suggest a Fix
unknown
JHipster Version(s)
7.1.0
JHipster configuration
<!--
JHipster Version(s)
/Users/Repos/GitLab/samplemicrofrontend
└── (empty)
cat: no such file or directory: .yo-rc.json
JHipster configuration, a .yo-rc.json file generated in the root folder
<details> <summary>.yo-rc.json file</summary> <pre>
</pre> </details>
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
<details> <summary>JDL entity definitions</summary>
<pre>
</pre> </details>
Environment and Tools
openjdk version "12.0.2" 2019-07-16 OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.2+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 12.0.2+10, mixed mode)
git version 2.23.0
node: v15.6.0
npm: 7.4.0
Docker version 20.10.5, build 55c4c88
docker-compose version 1.28.5, build c4eb3a1f
{ "generator-jhipster": { "authenticationType": "oauth2", "clientFramework": "angularX", "serverPort": "8080", "serviceDiscoveryType": "eureka", "skipUserManagement": true, "withAdminUi": true, "baseName": "frontend", "buildTool": "gradle", "databaseType": "sql", "devDatabaseType": "postgresql", "cacheProvider": "no", "enableHibernateCache": false, "enableSwaggerCodegen": true, "enableTranslation": true, "jhiPrefix": "jhi", "languages": [ "fr", "es", "en" ], "messageBroker": "kafka", "prodDatabaseType": "postgresql", "searchEngine": false, "skipClient": false, "testFrameworks": [ "gatling", "cucumber", "cypress" ], "websocket": false, "applicationType": "gateway", "packageName": "com.rdsidenow.frontend", "packageFolder": "com/rdsidenow/frontend", "clientPackageManager": "npm", "nativeLanguage": "en", "dtoSuffix": "DTO", "jhipsterVersion": "7.1.0", "skipServer": false, "entitySuffix": "", "reactive": true, "clientTheme": "none", "clientThemeVariant": "", "applicationIndex": 0 } }
If you have a JDL please wrap it in below structure <details> <summary>JDL definitions</summary> <pre>
deployment { deploymentType docker-compose, appsFolders [ frontend, item, estimating, profitability ], directoryPath "../" dockerRepositoryName "rdsidenow", gatewayType zuul, monitoring prometheus }
application { config { applicationType gateway, baseName frontend, packageName com.rdsidenow.frontend, serverPort 8080, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, messageBroker kafka, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], clientFramework angularX, jhiPrefix jhi, dtoSuffix DTO } entities * }
application { config { applicationType microservice, baseName profitability, packageName com.rdsidenow.profitability, serverPort 8081, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities Profitability, Transaction }
application { config { applicationType microservice, baseName estimating, packageName com.rdsidenow.estimating, serverPort 8082, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities Estimate, EstimateLineItem, EstimateItem }
application { config { applicationType microservice, baseName item, packageName com.rdsidenow.item, serverPort 8083, serviceDiscoveryType eureka, authenticationType oauth2, cacheProvider hazelcast, enableHibernateCache false, websocket false, messageBroker kafka, databaseType sql, devDatabaseType postgresql, prodDatabaseType postgresql, enableSwaggerCodegen true, buildTool gradle, clientPackageManager npm, testFrameworks [ gatling, cucumber, cypress ], enableTranslation true, nativeLanguage en, languages [ fr, es, en ], jhiPrefix jhi, dtoSuffix DTO, skipClient true, skipUserManagement true } entities ServiceOption, FeeOption }
entity Profitability { orderId String unique required, estBillTotal Long, estInvoiceTotal Long, billPaymentTotal Long, invoicePaymentTotal Long, estNetAmount Long, actNetAmount Long, profitable Boolean }
entity Transaction { orderId String required, invoiceId String , billId String , transactionType TransactionType, amount Long }
enum TransactionType { BILL_ESTIMATE, INVOICE_ESTIMATE, BILL_PAYMENT, INVOICE_PAYMENT }
entity Estimate { orderId String required, type EstimateType required, status EstimateStatus required, addTax Boolean, taxRate Integer min (0) max(100), subTotal Integer required, taxAmount Integer required, total Integer required }
enum EstimateStatus { OPEN, CLOSED, VOID }
enum EstimateType { INVOICE, BILL }
entity EstimateLineItem { unitPrice Long required, unit EstimateUnitType required, quantity Long required, discountQuantity Long required, addTax Boolean, limitType EstimateLimitType required, limitValue Long required, taxRate Long min (0) max(100), subTotal Long required, taxAmount Long required, total Long required }
enum EstimateLimitType { MILES, DOLLARS }
entity EstimateItem { name String unique required, rate Long required, discountQuantity Long, minQuantity Long, serviceOptionId String, feeOptionId String, unit EstimateUnitType required, isActive Boolean, deactivationDate Instant, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum EstimateUnitType { FLAT, PER_GALLON, PER_HOUR, PER_MILE, PER_DAY }
entity ServiceOption { name String unique required, groupType ServiceGroupType required, serviceType BasicServiceType required, unit ServiceUnitType required, vehicleClass ServiceVehicleClass required, rate Long required, minQuantity Long, deactivationDate Instant, isActive Boolean, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum ServiceGroupType { NON_SALVAGE, SALVAGE }
enum BasicServiceType { TOW, BATTERY, FLUID_DELIVERY, RIDE_SHARE, LOCKOUT, LOCKSMITH, WINCH_OUT, TIRE_CHANGE }
enum ServiceVehicleClass { LIGHT, MEDIUM, HEAVY, CYCLE }
enum ServiceUnitType { FLAT, PER_HOUR }
entity FeeOption { name String unique required, feeType BasicFeeType required, unit FeeUnitType required, rate Long required, discountQuantity Long, minQuantity Long, isActive Boolean, deactivationDate Instant, createdBy String, createdOn Instant, updatedBy String, updatedOn Instant }
enum FeeUnitType { FLAT, PER_GALLON, PER_HOUR, PER_MILE, PER_DAY }
enum BasicFeeType { FUEL, PREMIUM, CANCELLATION, CREDIT_CARD_PROCESSING, CLEAN_UP, FUEL_SURCHARGE, IDLE_TIME, MILES_TO_DESTINATION, MILES_TO_ORIGIN, RETURN_MILES, WINCHING, LABOR, STORAGE }
relationship OneToMany { Estimate to EstimateLineItem{estimate required} }
relationship ManyToOne { EstimateLineItem{estimateItem(name)} to EstimateItem } paginate * with pagination dto * with mapstruct filter *
</pre> </details> -->
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
<!-- IOS & Chrome-->
- [ X] Checking this box is mandatory (this is just to show you read everything)
<!-- Love JHipster? Please consider supporting our collective: 👉 https://opencollective.com/generator-jhipster/donate -->
created time in 6 hours
PR opened jhipster/generator-jhipster
<!-- PR description. --> Fix https://github.com/jhipster/generator-jhipster/issues/15387
Depends on https://github.com/jhipster/jhipster-bom/pull/353
Please make sure the below checklist is followed for Pull Requests.
- [ ] All continuous integration tests are green
- [ ] Tests are added where necessary
- [ ] The JDL part is updated if necessary
- [ ] jhipster-online is updated if necessary
- [ ] Documentation is added/updated where necessary
- [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.
<!-- Please also reference the issue number in a commit message to automatically close the related GitHub issue
Note: It is also possible to add [skip ci] or [ci skip] to your commit message to skip continuous integration tests
-->
pr created time in 6 hours
issue openedjhipster/generator-jhipster
Misconceptions on how Bi-Directional Relationships Work or Should Work
Overview of the issue
In many projects I am trying to create bi-directional relationships and they are not behaving as I expect them to. My understanding is probably the whole problem here but I think I am justified in not understanding what is happening under the hood here. When I see that relationships are bidirectional, I assume some things such as:
- Each side of the relationship has the ability to connect (or reference) the other object
- Each details page would include the related object (Is currently not always the case)
- Typescript Models would reflect the relationships as well (This does seem to work!)
- Entities would have queries that produced data for all the various relationships.
I have created a test project to replicate my issues. I hope I am not doing something weird or wrong. I want to thank You for taking time to look at this.
Motivation for or Use Case
I am confused about what syntax produces what results. If someone could be clearer in the documentation it would be great. For Example, in the test project, I have an Author object the can have many books. The Book should be able to KNOW their Author which should have a Set of books (ie. Bi-Directional).
relationship OneToMany {
// Expecting Bi-Directional relationship
// Author should have a SET of books and the BOOK has one Author
Author{books(name)} to Book{author(name)}
}
The above JDL works as I expect with the exception that the Author does not list their books on the detail page. No queries are created for the Author object to have the books in the Repository file. Am I missing something here?
<details> <summary>File: src/main/java/com/hepaestus/testproject/repository/AuthorRepository.java</summary> <pre> package com.hepaestus.testproject.repository; import com.hepaestus.testproject.domain.Author; import java.util.List; import java.util.Optional; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; /**
-
Spring Data SQL repository for the Author entity. */ @Repository public interface AuthorRepository extends JpaRepository<Author, Long> { @Query( value = "select distinct author from Author author left join fetch author.echoes left join fetch author.friends", countQuery = "select count(distinct author) from Author author" ) Page<Author> findAllWithEagerRelationships(Pageable pageable);
@Query("select distinct author from Author author left join fetch author.echoes left join fetch author.friends") List<Author> findAllWithEagerRelationships();
@Query("select author from Author author left join fetch author.echoes left join fetch author.friends where author.id =:id") Optional<Author> findOneWithEagerRelationships(@Param("id") Long id); } </pre> None of the generated Queries return the books related to the author. Nor is there a query created to look up all books by an author id. See the generated details page here:
</details>
Reproduce the error
See this test Project to Reproduce: https://github.com/hepaestus/testproject
Related issues
NO SURE
Suggest a Fix
On thing that would be awesome is if someone who better understands how relationships work in JH would write better documentation on relationship syntax in JDL. Better documentation of how the JDL syntax effects the generated features would be super helpful and probably reduce the number of questions. Right now it is not comprehensive and in various different locations. For example in the JDL examples repo [https://github.com/jhipster/jdl-samples] there are plenty examples however none that are documented. There is no mention of what the syntax is expected to achieve. Or why a particular syntax was used instead of another. This would be super helpful.
JHipster Version(s)
7.0.1
[email protected] /home/pete/git/testproject/foobar
└── [email protected]
JHipster configuration, a .yo-rc.json file generated in the root folder
<details> <summary>.yo-rc.json file</summary> <pre> { "generator-jhipster": { "authenticationType": "jwt", "cacheProvider": "ehcache", "clientFramework": "angularX", "serverPort": "8080", "serviceDiscoveryType": "eureka", "skipUserManagement": false, "withAdminUi": true, "baseName": "testproject", "buildTool": "maven", "databaseType": "sql", "devDatabaseType": "mysql", "enableHibernateCache": true, "enableSwaggerCodegen": false, "enableTranslation": true, "jhiPrefix": "jhi", "languages": ["en", "es"], "messageBroker": false, "prodDatabaseType": "mysql", "searchEngine": "elasticsearch", "skipClient": false, "testFrameworks": [], "websocket": false, "applicationType": "monolith", "blueprints": [], "clientPackageManager": "npm", "clientTheme": "lumen", "clientThemeVariant": "dark", "creationTimestamp": 1623354443010, "dtoSuffix": "DTO", "jhipsterVersion": "7.0.1", "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons", "nativeLanguage": "en", "otherModules": [], "packageName": "com.hepaestus.testproject", "packageFolder": "com/hepaestus/testproject", "reactive": false, "skipServer": false, "entitySuffix": "", "entities": ["Author", "Book", "Car", "Dog", "Echo", "Friend"], "skipCheckLengthOfIdentifier": false, "skipFakeData": false, "pages": [], "lastLiquibaseTimestamp": 1623354803000 } } </pre> </details>
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
<details> <summary>JDL entity definitions</summary> <pre> entity Author { name String firstName String lastName String type AddressType } entity Book { name String required created LocalDate description String } entity Car { name String required title String date LocalDate type CustomerType } entity Dog { name String required description String created LocalDate } entity Echo { name String required description String created LocalDate } entity Friend { name String required description String created LocalDate } enum AddressType { DEFAULT, HOME, BUSINESS } enum CustomerType { DEFAULT, REGULAR, ARTIST, DESIGNER, CORPORATE, ADMIN }
relationship OneToOne { // Expecting Bi-Directional BUT this causes an error when saving Author{user(login)} to User
//Expecting Bi-Directional Dog should have an "owner" Does not work as expected Author{dog(name)} to Dog{owner(name)} } relationship OneToMany { // Expecting Author details page to display a SET of books and the Book detail to display the Author // This is not what happens. Author does not show their books. But Does show other relationships. Author{books} to Book{author(name)}
// Expecting Author to have a SET of Cars and the Car to have an Owner // This is not what happens. Author details does not list Cars. A Car does list and Owner. Author{cars} to Car{owner}
// Expecting Bi-Directional with the name being displayed not the ID // This does not work. The dog is listed by in the Car details not not the inverse again. Car{dog(name)} to Dog{car(name)} } relationship ManyToMany {
// Expecting Bi-Directional echos should display their Author // Echoes have no reference to Authors Author{echo} to Echo{author(name)}
// Expecting Bi-Directional Friend should display their Authors and Authors Details shows Friends Author{friends(name)} to Friend{authors(name)}
// Expecting Bi-Directional Friend should display their Dogs // Friend does not reference dogs in the details page or the API. // Dog does reference its Friends in the details page // Friend object does NOT reference Dog Dog{friend} to Friend{dog} }
dto Author, Book, Car, Dog, Echo, Friend with mapstruct
service Author, Book, Car, Dog, Echo, Friend with serviceClass
search Author, Book, Car, Dog, Echo, Friend with elasticsearch
</pre>
</details>
Here is the Dog Details Page:
Notice it does not Display the Owner
Environment and Tools
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.10) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.10, mixed mode, sharing)
git version 2.27.0
node: v14.0.0
npm: 7.16.0
Docker version 20.10.7, build f0df350
docker-compose version 1.29.2, build 5becea4c
Entity configuration(s) entityName.json files generated in the .jhipster directory
AUTHOR ENTITY
<details> <description>Author Entity</description> <pre> { "name": "Author", "fields": [ { "fieldName": "name", "fieldType": "String" }, { "fieldName": "firstName", "fieldType": "String" }, { "fieldName": "lastName", "fieldType": "String" }, { "fieldName": "type", "fieldType": "AddressType", "fieldValues": "DEFAULT,HOME,BUSINESS" } ], "relationships": [ { "relationshipType": "one-to-one", "otherEntityName": "user", "otherEntityRelationshipName": "author", "relationshipName": "user", "ownerSide": true }, { "relationshipType": "one-to-one", "otherEntityName": "dog", "otherEntityRelationshipName": "author", "relationshipName": "dog", "ownerSide": true }, { "relationshipType": "one-to-many", "otherEntityName": "book", "otherEntityRelationshipName": "author", "relationshipName": "books" }, { "relationshipType": "one-to-many", "otherEntityName": "car", "otherEntityRelationshipName": "owner", "relationshipName": "cars" }, { "relationshipType": "many-to-many", "otherEntityName": "echo", "otherEntityRelationshipName": "author", "relationshipName": "echo", "ownerSide": true }, { "relationshipType": "many-to-many", "otherEntityName": "friend", "otherEntityRelationshipName": "authors", "relationshipName": "friends", "otherEntityField": "name", "ownerSide": true } ], "entityTableName": "author", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610194823" } </pre> </details>
BOOK ENTITY
<details> <summary>Book Entity</summary> <pre> { "name": "Book", "fields": [ { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, { "fieldName": "created", "fieldType": "LocalDate" }, { "fieldName": "description", "fieldType": "String" } ], "relationships": [ { "relationshipType": "many-to-one", "otherEntityName": "author", "otherEntityRelationshipName": "books", "relationshipName": "author", "otherEntityField": "name" } ], "entityTableName": "book", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610194923" } </pre> </details>
Car ENTITY
<details> <summary>Car Entity</summary> <pre> { "name": "Car", "fields": [ { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, { "fieldName": "title", "fieldType": "String" }, { "fieldName": "date", "fieldType": "LocalDate" }, { "fieldName": "type", "fieldType": "CustomerType", "fieldValues": "DEFAULT,REGULAR,ARTIST,DESIGNER,CORPORATE,ADMIN" } ], "relationships": [ { "relationshipType": "one-to-many", "otherEntityName": "dog", "otherEntityRelationshipName": "car", "relationshipName": "dog", "otherEntityField": "name" }, { "relationshipType": "many-to-one", "otherEntityName": "author", "otherEntityRelationshipName": "cars", "relationshipName": "owner" } ], "entityTableName": "car", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610195023" } </pre> </details>
Dog ENTITY
<details> <summary>Dog Entity</summary> <pre> { "name": "Dog", "fields": [ { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, { "fieldName": "description", "fieldType": "String" }, { "fieldName": "created", "fieldType": "LocalDate" } ], "relationships": [ { "relationshipType": "many-to-many", "otherEntityName": "friend", "otherEntityRelationshipName": "dog", "relationshipName": "friend", "ownerSide": true }, { "relationshipType": "one-to-one", "otherEntityName": "author", "otherEntityRelationshipName": "dog", "relationshipName": "author", "ownerSide": false }, { "relationshipType": "many-to-one", "otherEntityName": "car", "otherEntityRelationshipName": "dog", "relationshipName": "car", "otherEntityField": "name" } ], "entityTableName": "dog", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610195123" } </pre> </details>
ECHO ENTITY
<details> <summary>Echo Entity</summary> <pre> { "name": "Echo", "fields": [ { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, { "fieldName": "description", "fieldType": "String" }, { "fieldName": "created", "fieldType": "LocalDate" } ], "relationships": [ { "relationshipType": "many-to-many", "otherEntityName": "author", "otherEntityRelationshipName": "echo", "relationshipName": "author", "otherEntityField": "name", "ownerSide": false } ], "entityTableName": "echo", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610195223" } </pre> </details>
FRIEND ENTITY
<details> <summary>Friend Entity</summary> <pre> { "name": "Friend", "fields": [ { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, { "fieldName": "description", "fieldType": "String" }, { "fieldName": "created", "fieldType": "LocalDate" } ], "relationships": [ { "relationshipType": "many-to-many", "otherEntityName": "dog", "otherEntityRelationshipName": "friend", "relationshipName": "dog", "ownerSide": false }, { "relationshipType": "many-to-many", "otherEntityName": "author", "otherEntityRelationshipName": "friends", "relationshipName": "authors", "otherEntityField": "name", "ownerSide": false } ], "entityTableName": "friend", "dto": "mapstruct", "pagination": "no", "service": "serviceClass", "jpaMetamodelFiltering": false, "fluentMethods": true, "readOnly": false, "embedded": false, "applications": ["testproject"], "searchEngine": "elasticsearch", "changelogDate": "20210610195323" } </pre> </details>
Browsers and Operating System
Chrome Browser Linux version 5.8.0-53-generic (buildd@lgw01-amd64-020) (gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #60-Ubuntu SMP Thu May 6 07:46:32 UTC 2021
- [ X] Checking this box is mandatory (this is just to show you read everything)
created time in 6 hours
issue openedjhipster/generator-jhipster
Overview of the feature request
https://spring.io/blog/2021/05/20/spring-boot-2-5-is-now-ga
This will allow us to try Spring Native 0.10.0 for https://github.com/jhipster/generator-jhipster/issues/13733 and see if things are closer to working.
Motivation for or Use Case
I'd like to be able to compile a JHipster app to a native image.
Related issues or PR
- https://github.com/jhipster/generator-jhipster/issues/13733
- https://github.com/jhipster/jhipster-bom/pull/343
created time in 7 hours
issue commentformium/formik
Scroll to first invalid element
i am using useFormik and it's a bit trick to set focus on invalid entries.
so, i added hook like this.
useEffect(() => { if (Object.keys(formik.errors).length > 0) { document.getElementsByName(Object.keys(formik.errors)[0])[0].focus(); } }, [formik]);
and it works for me.
comment created time in 9 hours