Open ilopmar opened 10 years ago
I think when the type is a "citext" we should use getObject instead of getArray because is not a standard JDBC but a Postgres specific type. I had the same problem with the ranges support.
I think it's better to use getObject and then parse the String to change it into a String array.
Ok, I'll try to change it using your code of ranges as a guide
You're absolutely right, I don't know what I was thinking.
I used getObject for the json support but I don't think about it for the citext. Last night I did some tests and it works. Now I only have to find a good parser from string to array because I'm not going to write one from scratch :-P
Sorry I haven't had time to try this. Actually not sure how to try it without a release version to plug into my config.groovy file.
@aeischeid Currently the feature is not complete and the code is pretty ugly so we're not going to merge and release a new version with this. We're working on a way to parse the string with the postgres array to a java String[].
In any case, if you want to try you can clone the repo and define the plugin as inline instead of use a published version. You can add to your BuildConfig.groovy
:
grails.plugin.location."postgresql-extensions" = "../postgresql-extensions"
And remove the line in the plugins
section.
This PR is to fix the issue #26. Is not finished yet, some tests are missing. Please do not merge it.
@Alotor please review it and check specially the comment of
ArrayType
file. If you're not sure about merge it, we can at the office when I return from my holidays.