Home Grails 3 enumType for Set of enums
Reply: 0

Grails 3 enumType for Set of enums

user632
1#
user632 Published in June 19, 2018, 2:31 pm

How to define a mapping for Set with enumType:'identity' ?

In Grails 3.3 enumType become mandatory for Enums with id (for 3.2 it works without any additional definitions).

With Enum fields everything works well, but I don't know, how to write a mapping for Set of enums

class Test {
   Set<TestEnum> enums
   static mapping {
     enums  enumType: 'identity' // not works 
   }
}

enum TestEnum {
   final int id
   TestEnum(int value){
   ...
   }
}

Any ideas?

I know, I can use enumType:'string'. Not a case for me

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.328215 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO