kaleidos/grails-postgresql-extensions — pull request #10 by mattfeury (2013-08-24 00:14:48+00:00)
Title: The Enumerated Powers

Add support for an `IdentityEnumArrayType` that behaves very similar to the IntegerArray, except that it serializes and deserializes Enums to their ordinal integer value when saving/fetching from the DB.

I'm not too familiar with Hibernate or this code, so there are definitely some parts that are kind've pieced together. Ideally this would work with Strings in addition to the ordinal value, as well, but that's not included here. Let me know what you think. Happy to modify anything :)