Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 9289653

Browse files
authored
Merge pull request #910 from grails/restore-domain-inheritance
Use grails-bom, grails-bom h2 version, fix h2 tests & restore domain inheritance tests
2 parents 4914962 + c8de45d commit 9289653

File tree

17 files changed

+28
-27
lines changed

17 files changed

+28
-27
lines changed

boot-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ dependencies {
1313

1414
testRuntimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
1515
testRuntimeOnly "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatLog4jVersion"
16-
testRuntimeOnly "com.h2database:h2:$h2Version"
16+
testRuntimeOnly "com.h2database:h2"
1717
}

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ subprojects { Project subproject ->
8383
if(isExample) {
8484
apply plugin: "groovy"
8585

86-
ext['h2.version'] = h2Version
8786
ext['gorm.version'] = gormVersion
8887

8988
if(subproject.name.startsWith("examples-grails")) {
@@ -117,9 +116,8 @@ subprojects { Project subproject ->
117116
}
118117
}
119118

120-
121-
122119
dependencies {
120+
implementation platform("org.grails:grails-bom:$grailsVersion")
123121
testImplementation "jakarta.annotation:jakarta.annotation-api:$jakartaAnnotationApiVersion"
124122
testImplementation "io.micrometer:micrometer-core:latest.integration"
125123
testImplementation "io.projectreactor:reactor-test:$projectReactorVersion"
@@ -184,6 +182,10 @@ subprojects { Project subproject ->
184182

185183
apply plugin: 'groovy'
186184

185+
dependencies {
186+
implementation platform("org.grails:grails-bom:$grailsVersion")
187+
}
188+
187189
configurations {
188190
documentation.extendsFrom(compileClasspath)
189191
}

examples/grails3-hibernate5/grails-app/domain/functional/tests/Employee.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package functional.tests
22

3-
// TODO domain inheritance
4-
class Employee /*extends Person*/ {
3+
class Employee extends Person {
54

65
static belongsTo = [
76
business: Business

examples/spring-boot-hibernate5/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies {
3030
implementation "org.hibernate:hibernate-core-jakarta:$hibernate5Version"
3131
implementation "org.hibernate:hibernate-ehcache:$hibernate5Version"
3232

33-
runtimeOnly "com.h2database:h2:$h2Version"
33+
runtimeOnly "com.h2database:h2"
3434
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
3535
runtimeOnly "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatLog4jVersion"
3636
runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"

examples/standalone-hibernate5/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin:"groovy"
44

55
dependencies {
66
implementation project(":grails-datastore-gorm-hibernate5")
7-
runtimeOnly "com.h2database:h2:$h2Version"
7+
runtimeOnly "com.h2database:h2"
88
runtimeOnly "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
99
runtimeOnly "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatLog4jVersion"
1010
runtimeOnly "org.slf4j:slf4j-api:$slf4jVersion"

gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ grailsShellVersion=7.0.0-SNAPSHOT
1313
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT
1414
grailsVersion=7.0.0-SNAPSHOT
1515
groovydocGradlePluginVersion=1.0.1
16-
groovyVersion=4.0.23
17-
# Tests are built for 1.4.200, so stick with older version
18-
h2Version=1.4.200
16+
groovyVersion=4.0.24-SNAPSHOT
1917
hibernate5Version=5.6.15.Final
2018
hibernateValidatorVersion=8.0.1.Final
2119
hibernateGroovyProxy=1.1

grails-datastore-gorm-hibernate5/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies {
3838
testImplementation "org.grails:grails-datastore-gorm-tck:$gormVersion", {
3939
exclude group: "org.spockframework"
4040
}
41-
testImplementation "com.h2database:h2:$h2Version"
41+
testImplementation "com.h2database:h2"
4242

4343
testImplementation "org.hibernate:hibernate-ehcache:$hibernate5Version"
4444

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/SubclassMultipleListCollectionSpec.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ class Iteration {
4747
// static mappedBy = [products: 'iteration', otherProducts: 'none']
4848
}
4949

50-
// @Entity
51-
// https://issues.apache.org/jira/browse/GROOVY-5106 - The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity<grails.gorm.tests.XXX> and org.grails.datastore.gorm.GormEntity<grails.gorm.tests.XXX>
50+
@Entity
5251
class Product extends SuperProduct {
5352

5453
static belongsTo = [iteration: Iteration]

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/TablePerSubClassAndEmbeddedSpec.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ class Company {
7373
tablePerSubclass true
7474
}
7575
}
76-
// @Entity
77-
// https://issues.apache.org/jira/browse/GROOVY-5106 - The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity<grails.gorm.tests.XXX> and org.grails.datastore.gorm.GormEntity<grails.gorm.tests.XXX>
76+
@Entity
7877
class Vendor extends Company {
7978

8079
static constraints = {

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/events/UpdatePropertyInEventListenerSpec.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ class UpdatePropertyInEventListenerSpec extends Specification {
6969
class User {
7070
String username
7171
String password
72+
73+
static mapping = {
74+
table '`user`'
75+
password column: '`password`'
76+
}
7277
}
7378

7479
class PasswordEncodingListener extends AbstractPersistenceEventListener {

0 commit comments

Comments
 (0)