Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hibernate4] Support for array citext (case insensitive strings) #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ilopmar
Copy link
Collaborator

@ilopmar ilopmar commented Jul 26, 2014

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.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.56%) when pulling 5870619 on hibernate4/array_citext into 6b9218a on master.

@Alotor
Copy link
Member

Alotor commented Jul 27, 2014

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.

@ilopmar
Copy link
Collaborator Author

ilopmar commented Jul 27, 2014

Ok, I'll try to change it using your code of ranges as a guide

@ilopmar
Copy link
Collaborator Author

ilopmar commented Jul 28, 2014

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

@coveralls
Copy link

Coverage Status

Coverage increased (+0.52%) when pulling c0bd666 on hibernate4/array_citext into cc40563 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.52%) when pulling 285362a on hibernate4/array_citext into bbc1cb4 on master.

@aeischeid
Copy link
Contributor

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.

@ilopmar
Copy link
Collaborator Author

ilopmar commented Aug 19, 2014

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants