From f4eae7d103a3b1a8ea58d305c7314c2c1828d462 Mon Sep 17 00:00:00 2001 From: Alar Aule Date: Wed, 7 Apr 2021 22:58:09 +0300 Subject: [PATCH 01/14] Issue #274 apply Generated annotation to Traits, to improve test coverage reports --- .../orm/hibernate/HibernateEntity.groovy | 6 +++++ .../HibernateEntityTraitGeneratedSpec.groovy | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/HibernateEntityTraitGeneratedSpec.groovy diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/grails/orm/hibernate/HibernateEntity.groovy b/grails-datastore-gorm-hibernate5/src/main/groovy/grails/orm/hibernate/HibernateEntity.groovy index d70c6b4d..2c196d55 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/grails/orm/hibernate/HibernateEntity.groovy +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/grails/orm/hibernate/HibernateEntity.groovy @@ -1,6 +1,7 @@ package grails.gorm.hibernate import groovy.transform.CompileStatic +import groovy.transform.Generated import org.grails.datastore.gorm.GormEnhancer import org.grails.datastore.gorm.GormEntity import org.grails.orm.hibernate.AbstractHibernateGormStaticApi @@ -21,6 +22,7 @@ trait HibernateEntity extends GormEntity { * * @return The object */ + @Generated static List findAllWithSql(CharSequence sql) { currentHibernateStaticApi().findAllWithSql sql, Collections.emptyMap() } @@ -31,6 +33,7 @@ trait HibernateEntity extends GormEntity { * @param sql The sql query * @return The entity */ + @Generated static D findWithSql(CharSequence sql) { currentHibernateStaticApi().findWithSql(sql, Collections.emptyMap()) } @@ -42,6 +45,7 @@ trait HibernateEntity extends GormEntity { * * @return The object */ + @Generated static List findAllWithSql(CharSequence sql, Map args) { currentHibernateStaticApi().findAllWithSql sql, args } @@ -52,10 +56,12 @@ trait HibernateEntity extends GormEntity { * @param sql The sql query * @return The entity */ + @Generated static D findWithSql(CharSequence sql, Map args) { currentHibernateStaticApi().findWithSql(sql, args) } + @Generated private static AbstractHibernateGormStaticApi currentHibernateStaticApi() { (AbstractHibernateGormStaticApi)GormEnhancer.findStaticApi(this) } diff --git a/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/HibernateEntityTraitGeneratedSpec.groovy b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/HibernateEntityTraitGeneratedSpec.groovy new file mode 100644 index 00000000..806191db --- /dev/null +++ b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/HibernateEntityTraitGeneratedSpec.groovy @@ -0,0 +1,26 @@ +package grails.gorm.tests + +import grails.gorm.transactions.Rollback +import groovy.transform.Generated +import org.grails.orm.hibernate.HibernateDatastore +import org.springframework.transaction.PlatformTransactionManager +import spock.lang.AutoCleanup +import spock.lang.IgnoreIf +import spock.lang.Shared +import spock.lang.Specification + +@Rollback +class HibernateEntityTraitGeneratedSpec extends Specification { + + @Shared @AutoCleanup HibernateDatastore datastore = new HibernateDatastore(Club) + + void "test that all HibernateEntity trait methods are marked as Generated"() { + // Unfortunately static methods have to check directly one by one + expect: + Club.getMethod('findAllWithSql', CharSequence).isAnnotationPresent(Generated) + Club.getMethod('findWithSql', CharSequence).isAnnotationPresent(Generated) + Club.getMethod('findAllWithSql', CharSequence, Map).isAnnotationPresent(Generated) + Club.getMethod('findWithSql', CharSequence, Map).isAnnotationPresent(Generated) + } + +} From 39bc44dfa4bd246bfda99421355101b7a021ae8f Mon Sep 17 00:00:00 2001 From: Alar Aule Date: Wed, 7 Apr 2021 23:19:34 +0300 Subject: [PATCH 02/14] Issue #274 apply Generated annotation to methods/constructors created with AST transformation, to improve test coverage reports --- .../compiler/HibernateEntityTransformation.groovy | 10 ++++++++++ .../HibernateEntityTransformationSpec.groovy | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformation.groovy b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformation.groovy index 569f78df..733b4a7c 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformation.groovy +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformation.groovy @@ -3,6 +3,7 @@ package org.grails.orm.hibernate.compiler import grails.gorm.dirty.checking.DirtyCheckedProperty import groovy.transform.CompilationUnitAware import groovy.transform.CompileStatic +import org.apache.groovy.ast.tools.AnnotatedNodeUtils import org.codehaus.groovy.ast.* import org.codehaus.groovy.ast.stmt.BlockStatement import org.codehaus.groovy.ast.stmt.IfStatement @@ -124,6 +125,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni returnS(varX(interceptorField)) ) classNode.addMethod(getInterceptorMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, getInterceptorMethod) staticCompilationVisitor.visitMethod(getInterceptorMethod) // add method: void $$_hibernate_setInterceptor(PersistentAttributeInterceptor interceptor) @@ -137,6 +139,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni assignS( varX(interceptorField), varX(p1) ) ) classNode.addMethod(setInterceptorMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, setInterceptorMethod) staticCompilationVisitor.visitMethod(setInterceptorMethod) // add method: Object $$_hibernate_getEntityInstance() @@ -149,6 +152,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni returnS(varX("this")) ) classNode.addMethod(getEntityInstanceMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, getEntityInstanceMethod) staticCompilationVisitor.visitMethod(getEntityInstanceMethod) @@ -162,6 +166,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni returnS(varX(entityEntryHolderField)) ) classNode.addMethod(getEntityEntryMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, getEntityEntryMethod) staticCompilationVisitor.visitMethod(getEntityEntryMethod) // add method: void $$_hibernate_setEntityEntry(EntityEntry entityEntry) @@ -175,6 +180,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni assignS( varX(entityEntryHolderField), varX(entityEntryParam) ) ) classNode.addMethod(setEntityEntryMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, setEntityEntryMethod) staticCompilationVisitor.visitMethod(setEntityEntryMethod) // add method: ManagedEntity $$_hibernate_getPreviousManagedEntity() @@ -187,6 +193,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni returnS(varX(previousManagedEntityField)) ) classNode.addMethod(getPreviousManagedEntityMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, getPreviousManagedEntityMethod) staticCompilationVisitor.visitMethod(getPreviousManagedEntityMethod) // add method: ManagedEntity $$_hibernate_getNextManagedEntity() { @@ -199,6 +206,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni returnS(varX(nextManagedEntityField)) ) classNode.addMethod(getNextManagedEntityMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, getNextManagedEntityMethod) staticCompilationVisitor.visitMethod(getNextManagedEntityMethod) // add method: void $$_hibernate_setPreviousManagedEntity(ManagedEntity previous) @@ -212,6 +220,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni assignS( varX(previousManagedEntityField), varX(previousParam) ) ) classNode.addMethod(setPreviousManagedEntityMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, setPreviousManagedEntityMethod) staticCompilationVisitor.visitMethod(setPreviousManagedEntityMethod) // add method: void $$_hibernate_setNextManagedEntity(ManagedEntity next) @@ -225,6 +234,7 @@ class HibernateEntityTransformation implements ASTTransformation, CompilationUni assignS( varX(nextManagedEntityField), varX(nextParam) ) ) classNode.addMethod(setNextManagedEntityMethod) + AnnotatedNodeUtils.markAsGenerated(classNode, setNextManagedEntityMethod) staticCompilationVisitor.visitMethod(setNextManagedEntityMethod) List allMethods = classNode.getMethods() diff --git a/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformationSpec.groovy b/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformationSpec.groovy index bd0bf5f1..7e308875 100644 --- a/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformationSpec.groovy +++ b/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/compiler/HibernateEntityTransformationSpec.groovy @@ -1,5 +1,7 @@ package org.grails.orm.hibernate.compiler +import groovy.transform.Generated +import org.hibernate.engine.spi.EntityEntry import org.hibernate.engine.spi.ManagedEntity import org.hibernate.engine.spi.PersistentAttributeInterceptable import org.hibernate.engine.spi.PersistentAttributeInterceptor @@ -153,6 +155,17 @@ class MyEntity { then:"The value is changed" myEntity.name == 'changed' + + and: "by transformation added methods are all marked as Generated" + cls.getMethod('$$_hibernate_getInterceptor').isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_setInterceptor', PersistentAttributeInterceptor).isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_getEntityInstance').isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_getEntityEntry').isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_setEntityEntry', EntityEntry).isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_getPreviousManagedEntity').isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_getNextManagedEntity').isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_setPreviousManagedEntity', ManagedEntity).isAnnotationPresent(Generated) + cls.getMethod('$$_hibernate_setNextManagedEntity', ManagedEntity).isAnnotationPresent(Generated) } } @grails.gorm.hibernate.annotation.ManagedEntity From f26e3b228a71d519e84e8709c18791b28e3564b9 Mon Sep 17 00:00:00 2001 From: William Malinowski Date: Sun, 26 Sep 2021 21:49:59 -0400 Subject: [PATCH 03/14] added a test case that shows #110 is fixed, fix for #110 based on 7.0.x branch --- .../AbstractHibernateGormInstanceApi.groovy | 2 +- ...EmbeddedWithValidationExceptionSpec.groovy | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormInstanceApi.groovy b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormInstanceApi.groovy index 7dc55401..f8c6c71e 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormInstanceApi.groovy +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/AbstractHibernateGormInstanceApi.groovy @@ -390,7 +390,7 @@ abstract class AbstractHibernateGormInstanceApi extends GormInstanceApi { setObjectToReadOnly target if (entity) { for (Association association in entity.associations) { - if (association instanceof ToOne) { + if (association instanceof ToOne && !association instanceof Embedded) { if(proxyHandler.isInitialized(target, association.name)) { def bean = new BeanWrapperImpl(target) def propertyValue = bean.getPropertyValue(association.name) diff --git a/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy new file mode 100644 index 00000000..daa4b6af --- /dev/null +++ b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy @@ -0,0 +1,54 @@ +package grails.gorm.tests.validation + +import grails.gorm.annotation.Entity +import grails.gorm.tests.GormDatastoreSpec +import grails.gorm.transactions.Rollback +import grails.validation.ValidationException +import spock.lang.Issue + +class EmbeddedWithValidationExceptionSpec extends GormDatastoreSpec { + @Override + List getDomainClasses() { + return [DomainWithEmbedded] + } + + @Rollback + @Issue("https://github.com/grails/gorm-hibernate5/issues/110") + void "test validation exception with embedded in domain"() { + when: + new DomainWithEmbedded( + foo: 'not valid', + myEmbedded: new MyEmbedded( + a: 1, + b: 'foo' + ) + ).save(failOnError: true) + + then: + thrown(ValidationException) + } +} + +@Entity +class DomainWithEmbedded { + MyEmbedded myEmbedded + String foo + + static embedded = ['myEmbedded'] + + static constraints = { + foo(validator: { val, self -> + return 'not.valid.foo' + }) + } +} + +class MyEmbedded { + Integer a + String b + + static constraints = { + a(nullable: true) + b(nullalbe: true) + } +} \ No newline at end of file From d284095a5083b9a48a8b822d9153dc444022cd41 Mon Sep 17 00:00:00 2001 From: William Malinowski Date: Mon, 27 Sep 2021 19:59:29 -0400 Subject: [PATCH 04/14] change the test case to extend Specification instead of GormDatastoreSpec --- .../EmbeddedWithValidationExceptionSpec.groovy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy index daa4b6af..6d410aa2 100644 --- a/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy +++ b/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/validation/EmbeddedWithValidationExceptionSpec.groovy @@ -1,16 +1,16 @@ package grails.gorm.tests.validation import grails.gorm.annotation.Entity -import grails.gorm.tests.GormDatastoreSpec import grails.gorm.transactions.Rollback import grails.validation.ValidationException +import org.grails.orm.hibernate.HibernateDatastore +import spock.lang.AutoCleanup import spock.lang.Issue +import spock.lang.Shared +import spock.lang.Specification -class EmbeddedWithValidationExceptionSpec extends GormDatastoreSpec { - @Override - List getDomainClasses() { - return [DomainWithEmbedded] - } +class EmbeddedWithValidationExceptionSpec extends Specification { + @Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(DomainWithEmbedded) @Rollback @Issue("https://github.com/grails/gorm-hibernate5/issues/110") From 9514cbbfe40771339fec93dac6914878a32bccd5 Mon Sep 17 00:00:00 2001 From: William Malinowski Date: Fri, 1 Oct 2021 06:35:50 -0400 Subject: [PATCH 05/14] changed database name used in failing spec --- .../connections/DataSourceConnectionSourceFactorySpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/connections/DataSourceConnectionSourceFactorySpec.groovy b/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/connections/DataSourceConnectionSourceFactorySpec.groovy index 06158a37..149348be 100644 --- a/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/connections/DataSourceConnectionSourceFactorySpec.groovy +++ b/grails-datastore-gorm-hibernate5/src/test/groovy/org/grails/orm/hibernate/connections/DataSourceConnectionSourceFactorySpec.groovy @@ -16,7 +16,7 @@ class DataSourceConnectionSourceFactorySpec extends Specification { when: DataSourceConnectionSourceFactory factory = new DataSourceConnectionSourceFactory() Map config = [ - 'dataSource.url':"jdbc:h2:mem:grailsDB;MVCC=TRUE;LOCK_TIMEOUT=10000", + 'dataSource.url':"jdbc:h2:mem:dsConnDsFactorySpecDb;MVCC=TRUE;LOCK_TIMEOUT=10000", 'dataSource.dbCreate': 'update', 'dataSource.dialect': Oracle8iDialect.name, 'dataSource.properties.dbProperties': [useSSL: false] From 1042f010c843f3568213eb0cba4de84eca3d5b27 Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Tue, 19 Oct 2021 14:01:26 +0530 Subject: [PATCH 06/14] Only publish test reports when failure --- .github/workflows/gradle.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2c30fe4f..84e325f6 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -39,14 +39,12 @@ jobs: uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - - name: Optional setup step - run: | - [ -f ./setup.sh ] && ./setup.sh || true - name: Run all tests (chromeHeadless) except spring-boot run: ./gradlew -Dgeb.env=chromeHeadless check --no-daemon -x gorm-hibernate5-spring-boot:test - name: Run Spring Boot Tests run: ./gradlew gorm-hibernate5-spring-boot:test --no-daemon - name: Publish Test Report + if: failure() uses: scacap/action-surefire-report@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From 41f5aa0ba4dc7499db602cede16cf6612b9de4f1 Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Tue, 19 Oct 2021 14:10:12 +0530 Subject: [PATCH 07/14] Fixed YAML syntax --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 84e325f6..f7d23bfa 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -44,7 +44,7 @@ jobs: - name: Run Spring Boot Tests run: ./gradlew gorm-hibernate5-spring-boot:test --no-daemon - name: Publish Test Report - if: failure() + if: failure() uses: scacap/action-surefire-report@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} From 031b5b9974e3bba19496223b2cc3855708cbc39a Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Wed, 12 Jan 2022 15:53:21 +0530 Subject: [PATCH 08/14] Fix problem with tenantId part of Composite identifier (#451) (#479) * Fix problem with tenantId part of Composite identifier Fixes #450 * add multitenant with composite Co-authored-by: Sergio del Amo Co-authored-by: Sergio del Amo --- .../grails-app/conf/application.yml | 5 +++++ .../domain/example/MultitenantBook.groovy | 15 +++++++++++++++ .../orm/hibernate/cfg/GrailsDomainBinder.java | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 examples/test-data-service/grails-app/domain/example/MultitenantBook.groovy diff --git a/examples/test-data-service/grails-app/conf/application.yml b/examples/test-data-service/grails-app/conf/application.yml index 48116b8d..e201465f 100644 --- a/examples/test-data-service/grails-app/conf/application.yml +++ b/examples/test-data-service/grails-app/conf/application.yml @@ -1,3 +1,8 @@ +grails: + gorm: + multiTenancy: + mode: DISCRIMINATOR + tenantResolverClass: org.grails.datastore.mapping.multitenancy.web.SessionTenantResolver --- grails: profile: rest-api diff --git a/examples/test-data-service/grails-app/domain/example/MultitenantBook.groovy b/examples/test-data-service/grails-app/domain/example/MultitenantBook.groovy new file mode 100644 index 00000000..c5629380 --- /dev/null +++ b/examples/test-data-service/grails-app/domain/example/MultitenantBook.groovy @@ -0,0 +1,15 @@ +package example + +import grails.gorm.MultiTenant + +// Issue: https://github.com/grails/gorm-hibernate5/issues/450 +// Pr: https://github.com/grails/gorm-hibernate5/pull/451 +class MultitenantBook implements MultiTenant, Serializable { + String id + String tenantId + String title + + static mapping = { + id composite: ['id', 'tenantId'] + } +} \ No newline at end of file diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java index 16aff703..533b8f00 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java @@ -1443,7 +1443,7 @@ protected void addMultiTenantFilterIfNecessary( mappings.addFilterDefinition(new FilterDefinition( GormProperties.TENANT_IDENTITY, filterCondition, - Collections.singletonMap(GormProperties.TENANT_IDENTITY, persistentClass.getProperty(tenantId.getName()).getType()) + Collections.singletonMap(GormProperties.TENANT_IDENTITY, getProperty(persistentClass, tenantId.getName()).getType()) )); } } From 231f0dfb561fd31cfccffb035815b50fa518174c Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Wed, 12 Jan 2022 15:53:33 +0530 Subject: [PATCH 09/14] Update nexusUrl to the new infrastructure (#480) --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 92981b22..d074efb5 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,7 @@ if (isReleaseVersion) { def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : '' def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : '' def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : '' + nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") username = ossUser password = ossPass stagingProfileId = ossStagingProfileId From febc4d4748f4a41c38be03e749439843dd1971e0 Mon Sep 17 00:00:00 2001 From: puneetbehl Date: Wed, 12 Jan 2022 10:36:11 +0000 Subject: [PATCH 10/14] [skip ci] Release v7.0.6 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d24ef40f..71fa449d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ tomcatVersion=8.5.0 snakeyamlVersion=1.23 jaxbVersion=2.3.1 picocliVersion=3.8.0 -projectVersion=7.0.6.BUILD-SNAPSHOT +projectVersion=7.0.6 jansiVersion=1.17.1 assetPipelineVersion=3.0.7 spockVersion=1.2-groovy-2.5 From e9556e25c3759085da1b9bec6bd6775603d6150f Mon Sep 17 00:00:00 2001 From: puneetbehl Date: Wed, 12 Jan 2022 10:40:53 +0000 Subject: [PATCH 11/14] Back to 7.0.7.BUILD-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 71fa449d..3ef9a06d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ tomcatVersion=8.5.0 snakeyamlVersion=1.23 jaxbVersion=2.3.1 picocliVersion=3.8.0 -projectVersion=7.0.6 +projectVersion=7.0.7.BUILD-SNAPSHOT jansiVersion=1.17.1 assetPipelineVersion=3.0.7 spockVersion=1.2-groovy-2.5 From b45f955f9fe9977f88998491554f768c67f2371b Mon Sep 17 00:00:00 2001 From: purpleraven Date: Thu, 20 Jan 2022 09:35:29 +0100 Subject: [PATCH 12/14] Second level cache not working for inherited domains (#483) * caching properties transition from parent to chind https://github.com/grails/grails-data-mapping/issues/1594 * caching properties transition from parent to chind https://github.com/grails/grails-data-mapping/issues/1594 --- .../org/grails/orm/hibernate/cfg/GrailsDomainBinder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java index 533b8f00..f30f05e4 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java @@ -1516,7 +1516,9 @@ else if(tablePerConcreteClass) { if (m.getDynamicInsert()) { subClass.setDynamicInsert(true); } - + + subClass.setCached(parent.isCached()); + subClass.setAbstract(sub.isAbstract()); subClass.setEntityName(fullName); subClass.setJpaEntityName(unqualify(fullName)); From 53c50809b80f2316da986269a2980449b1752956 Mon Sep 17 00:00:00 2001 From: puneetbehl Date: Wed, 21 Dec 2022 02:58:35 +0000 Subject: [PATCH 13/14] [skip ci] Release v7.0.7 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 3ef9a06d..193c4d46 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ tomcatVersion=8.5.0 snakeyamlVersion=1.23 jaxbVersion=2.3.1 picocliVersion=3.8.0 -projectVersion=7.0.7.BUILD-SNAPSHOT +projectVersion=7.0.7 jansiVersion=1.17.1 assetPipelineVersion=3.0.7 spockVersion=1.2-groovy-2.5 From 6190cc8e70c3e42a066322d85ad383b71a7ad514 Mon Sep 17 00:00:00 2001 From: puneetbehl Date: Wed, 21 Dec 2022 03:02:45 +0000 Subject: [PATCH 14/14] Back to 7.0.8.BUILD-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 193c4d46..09ca1171 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ tomcatVersion=8.5.0 snakeyamlVersion=1.23 jaxbVersion=2.3.1 picocliVersion=3.8.0 -projectVersion=7.0.7 +projectVersion=7.0.8.BUILD-SNAPSHOT jansiVersion=1.17.1 assetPipelineVersion=3.0.7 spockVersion=1.2-groovy-2.5