I have some properties with enum types in my domain objects, but it
appears they are not supported yet. Would that be complicated to do?
Cheers,
Marcus
Sure. This test case fails:
diff --git
a/spring-datastore-core/src/test/groovy/org/springframework/datastore/mapping/GormMappingSyntaxTests.groovy
b/spring-datastore
index 0c18f77..daf51ac 100644
---
a/spring-datastore-core/src/test/groovy/org/springframework/datastore/mapping/GormMappingSyntaxTests.groovy
+++
b/spring-datastore-core/src/test/groovy/org/springframework/datastore/mapping/GormMappingSyntaxTests.groovy
@@ -44,7 +44,16 @@ class GormMappingSyntaxTests {
def strategy = context.mappingSyntaxStrategy
def props = strategy.getPersistentProperties(TestEntity,context)
assert props.size() == 3
+ }
+ @Test
+ void enumProperties() {
+ def context = new TestMappingContext()
+ def e = context.addPersistentEntity(TShirt)
+ def strategy = context.mappingSyntaxStrategy
+ def props = strategy.getPersistentProperties(TShirt, context)
+ assert props.size() == 2
+ assert e.getPropertyByName('sz')
}
@Test
@@ -157,3 +166,11 @@ class SecondEntity {
static transients = ['bar']
}
+enum Size {
+ SMALL, MEDIUM, LARGE
+}
+
+...@grails.persistence.Entity
+class TShirt {
+ Size sz
+}