Skip to content

Commit 9ad0439

Browse files
committed
Use GORM Entity instead of grails.persistence.Entity
Closes gh-64
1 parent c4f34ca commit 9ad0439

File tree

67 files changed

+86
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+86
-89
lines changed

grace-datastore-gorm-support/src/test/groovy/org/grails/datastore/gorm/GormEntityTraitSpec.groovy

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.grails.datastore.gorm
22

33
import grails.artefact.Artefact
4-
import grails.persistence.Entity
4+
import grails.gorm.annotation.Entity
55
import org.grails.datastore.gorm.query.GormQueryOperations
66
import org.grails.datastore.mapping.dirty.checking.DirtyCheckable
77
import org.grails.datastore.mapping.model.config.GormProperties
@@ -35,7 +35,7 @@ class GormEntityTraitSpec extends Specification {
3535
void "Test dynamic parse"(){
3636
when:
3737
def cls = new GroovyClassLoader().parseClass('''
38-
import grails.persistence.*
38+
import grails.gorm.annotation.Entity
3939
4040
@Entity
4141
class Book {
@@ -92,7 +92,7 @@ class Publisher {
9292
def cl = new GroovyClassLoader()
9393
when:
9494
def cls = cl.parseClass('''
95-
import grails.persistence.*
95+
import grails.gorm.annotation.Entity
9696
9797
@Entity
9898
class Group {
@@ -134,6 +134,7 @@ class SubMember extends Member {
134134
cls.getAnnotation(grails.gorm.annotation.Entity)
135135
ClassPropertyFetcher.forClass(SubMember).getStaticPropertyValuesFromInheritanceHierarchy(GormProperties.TRANSIENT, Collection) == [[], ["transientProperty"]]
136136
}
137+
137138
void "test that a class marked with @Artefact('Domain') is enhanced with GormEntityTraitSpec"() {
138139
expect:
139140
GormEntity.isAssignableFrom QueryMethodArtefactDomain
@@ -156,7 +157,7 @@ class SubMember extends Member {
156157
}
157158
}
158159

159-
@Artefact('Domain')
160+
@Entity
160161
class QueryMethodArtefactDomain {
161162
String name
162163
}

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ChildEntity.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
/**
66
* @author graemerocher

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/CircularOneToManySpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
/**
66
* @author graemerocher

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ClassWithHungarianNotation.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
/**
66
* @author sdelamo

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ClassWithListArgBeforeValidate.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
@Entity
66
class ClassWithListArgBeforeValidate implements Serializable {

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ClassWithNoArgBeforeValidate.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity;
3+
import grails.gorm.annotation.Entity;
44

55
@Entity
66
class ClassWithNoArgBeforeValidate implements Serializable {

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ClassWithOverloadedBeforeValidate.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
@Entity
66
class ClassWithOverloadedBeforeValidate implements Serializable {

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/CommonTypesPersistenceSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
/**
66
* @author graemerocher

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/ConstraintsSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44

55
class ConstraintsSpec extends GormDatastoreSpec {
66

grace-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DirtyCheckingAfterListenerSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grails.gorm.tests
22

3-
import grails.persistence.Entity
3+
import grails.gorm.annotation.Entity
44
import org.grails.datastore.gorm.events.ConfigurableApplicationEventPublisher
55
import org.grails.datastore.mapping.core.Datastore
66
import org.grails.datastore.mapping.engine.event.AbstractPersistenceEvent

0 commit comments

Comments
 (0)