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

Commit 337debd

Browse files
Fixes composite id definition
When writing a new test with the same syntax as here I noticed that the id(composite: …) syntax doesn’t work. Is this a bug?
1 parent 78d3986 commit 337debd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/compositeid/CompositeIdWithDeepOneToManyMappingSpec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Child implements Serializable {
4343
static belongsTo= [parent: Parent]
4444

4545
static mapping = MappingBuilder.define {
46-
id(composite: ['parent', 'name'])
46+
composite('parent', 'name')
4747
}
4848
}
4949

@@ -56,7 +56,7 @@ class Parent implements Serializable {
5656
static hasMany= [children: Child]
5757

5858
static mapping= MappingBuilder.define {
59-
id(composite: ['grandParent', 'name'])
59+
composite('grandParent', 'name')
6060
}
6161
}
6262

@@ -69,6 +69,6 @@ class GrandParent implements Serializable {
6969
static hasMany= [parents: Parent]
7070

7171
static mapping= MappingBuilder.define {
72-
id(composite: ['name', 'luckyNumber'])
72+
composite('name', 'luckyNumber')
7373
}
7474
}

0 commit comments

Comments
 (0)