-
Notifications
You must be signed in to change notification settings - Fork 62
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
String type and db type #52
Comments
Hi! As you can see in the dialect file, the string array is mapped with varchar: https://github.com/kaleidos/grails-postgresql-extensions/blob/master/src/java/net/kaleidos/hibernate/PostgresqlExtensionsDialect.java#L27 You can subclass the dialect an override the definition of the array type for strings to use text instead of varchar. Please let me know if this works for you. |
Or even better, we could create a new TEXT_ARRAY that use text instead of varchar. @Alotor, what do you think? |
It doesn't really matter I think, the implementation behind the scenes is 100% identical for varchar and text, and varchar[] gives a non-limited per-string size, so any kind of change should not be able to make a difference. I am not going to close the issue if you want to keep discussing, but consider me satisfied. Great plugin by the way! :) Crossing my fingers that some of you might need postgis and add that to the database as well ;) |
I think maybe we can add an additional parameter to support text arrays. For example:
I think this is cleaner and easier 😄 |
Hi.
ArrayType with String becomes varchar[] now, where would I look to be able to get it to be text instead?
I have "user-type" type: org.hibernate.type.TextType, class: String in my gorm default mappings, but this does not seem to be used by the plugin.
The text was updated successfully, but these errors were encountered: