In Grails I would like to have an id that has a prefix and is autoincremented.
I would have these prefixes: A
and B
.
Then I would have a following sequence:
new MyObject('A').save()
---> id = A-1
new MyObject('A').save()
---> id = A-2
new MyObject('B').save()
---> id = A-3
and so on... Is it possible to combine assigned
generator with auto-increment
?