Re-generating a project with no changes removes entity cache and inclusion in liquibase master
JasonTypesCodes opened this issue · comments
Overview of the issue
If you generate a project and then generate it again with no changes, it alters CacheConfiguration.java
and liquibase/master.xml
Reproduce the error
mhipster import-jdl test.jdl
git status
mhipster
- Tell it to force all overwrites
git status
git diff
diff --git a/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java b/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java
index 6a52182..cea1f73 100644
--- a/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java
+++ b/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java
@@ -47,7 +47,6 @@ public class CacheConfiguration {
createCache(cm, com.mycompany.myapp.domain.User.class.getName());
createCache(cm, com.mycompany.myapp.domain.Authority.class.getName());
createCache(cm, com.mycompany.myapp.domain.User.class.getName() + ".authorities");
- createCache(cm, com.mycompany.myapp.domain.Something.class.getName());
// jhipster-needle-ehcache-add-entry
}
diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml
index cc6f1ec..6b937fe 100644
--- a/src/main/resources/config/liquibase/master.xml
+++ b/src/main/resources/config/liquibase/master.xml
@@ -14,7 +14,6 @@
<property name="uuidType" value="varchar(36)" dbms="h2, mysql, mariadb"/>
<include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
- <include file="config/liquibase/changelog/20200813034231_added_entity_Something.xml" relativeToChangelogFile="false"/>
<!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
<!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here -->
Project configuration
application {
config {
applicationType monolith
authenticationType jwt
baseName jhipster
blueprints [generator-jhipster-micronaut]
buildTool maven
cacheProvider ehcache
clientFramework angularX
clientPackageManager npm
clientTheme none
creationTimestamp 1597261837971
databaseType sql
devDatabaseType h2Disk
dtoSuffix DTO
embeddableLaunchScript false
enableHibernateCache true
enableSwaggerCodegen false
enableTranslation true
jhiPrefix jhi
jhipsterVersion "6.10.1"
languages [en]
messageBroker false
nativeLanguage en
packageName com.mycompany.myapp
prodDatabaseType mysql
searchEngine false
serverPort 8080
serviceDiscoveryType false
skipClient true
skipServer false
skipUserManagement false
testFrameworks []
useSass true
websocket false
}
entities Something
}
entity Something {
name String required minlength(3),
val Integer
}
dto Something with mapstruct
paginate Something with infinite-scroll
service Something with serviceImpl
Browsers and Operating System
Fedora Linux 31
- Checking this box is mandatory (this is just to show you read everything)
Not sure but I think you need to mhipster --with-entities
to regenerate with all entities if I am not mistaken.
That works. Thanks!