kaleidos / grails-postgresql-extensions

Grails plugin to use postgresql native elements such as arrays, hstores,...
Apache License 2.0
78 stars 62 forks source link

The Enumerated Powers #10

Closed mattfeury closed 11 years ago

mattfeury commented 11 years ago

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 :)

ilopmar commented 11 years ago

Hi,

Thank you very much for your contribution, I really appreciate it.

Before we can merge your pull request you have to create some integration tests. Please check out this tests https://github.com/kaleidos/grails-postgresql-extensions/tree/master/test/integration/net/kaleidos/hibernate/array and create similar ones for your new functionality.

Regards, Iván.

mattfeury commented 11 years ago

@lmivan I have added tests. Let me know if they're up to snuff.

ilopmar commented 11 years ago

Wooow, that was fast :-) I have to review the changes in my laptop (I'm on the tablet now) but they are good. I hope I can merge your pull request tonight and release a new version of the plugin.

Can you send me your twitter user (if you have one)? I want to include it in the docs and in the tweet when I publish the new version.

Thank you again for your contribution.

Regards, Iván.

mattfeury commented 11 years ago

awesome! i'm @soundandfeury on twitter. thanks for this. it's really gonna help my project