-
-
Notifications
You must be signed in to change notification settings - Fork 967
GRAILS-10335 - Override Grails mappings for collections when property is mapped with a custom Hibernate UserType Edit #388
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
Conversation
… is mapped with a custom Hibernate UserType
|
Is there any chance that the patch would be accepted for 2.2.x and merged into master before the final 2.3.0 and before another 2.2.x release? Regard, Iván. |
|
For Grails 2.3.x, the code for this has moved to https://github.com/SpringSource/grails-data-mapping/tree/master/grails-datastore-gorm-hibernate Please could you submit a pull request for there as well |
|
Hi Grame, I've found the class I have to change here https://github.com/SpringSource/grails-data-mapping/blob/master/grails-datastore-gorm-hibernate-core/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/AbstractGrailsDomainBinder.java but I'm not really sure where are the tests. Could you please give me a hint of where I should put the tests like in this pull request? Thank you very much. Regards, Iván. |
|
The tests are in the individual hibernate plugins. See https://github.com/grails-plugins/grails-hibernate-plugin |
|
Hi Graeme, I've made two pull requests:
Maybe this a stupid question, but I think this it's a bit weird. I mean, I have to commit the code to one repo (grails-data-mapping) and then commit the tests to another one (grails-hibernate-plugin). It's quite obviously that if you have decide to move some parts of the grails-core to another components and repos for grails 2.3 it's a good decision, but for "normal" people like me that have found a bug and want to contribute with the patch it's not easy to find where to put all the stuff. Maybe you should post a blog entry or create a wiki page with a little explanation for "newbie" people. Thanks again. Regards, Iván. |
|
i'd love to give a second request for merge on this. this is pretty clutch functionality for any of us using postgres. |
GRAILS-10335 - Override Grails mappings for collections when property is mapped with a custom Hibernate UserType Edit
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…he#388) * fix: set default `importJavaTime` value to `false` The `importJavaTime` setting modifies the import behavior for Java Date/Time classes by applying a config script to the Groovy compiler. This causes issues in Grails plugins, as the config script interferes with the generation of the `META-INF/grails-plugin.xml` file. By defaulting `importJavaTime` to `false`, these issues are avoided until a more robust solution can be implemented. * fix: honor the `importJavaTime` setting This fix addresses a problem where the `importJavaTime` setting was not honored as it was used in the evaluation phase, before the project got a chance to change it. * build: add the `grails-bom` The `grails-bom` is no longer an `api` dependency in `grails-core`. * fix: support multiple compiler configs to be merged This commit will enable more than one compiler configuration to be used by merging them. It will also merge the compiler configs for generating `grails-plugin.xml` and importing Java Date/Time.
* fix: handle no configscript Related to apache#388 * fix: remove config script to prevent unwanted appends Resolves an issue where the config script was unintentionally appended. Related to apache#388
Add a guard to ensure the configScript task is registered only once, resolving an issue where applying multiple Gradle plugins lead to an error that the task is already created. Related to apache#388.
Updating for grails-publish plugin change
…apache#388) * Set profile on all applications now that grail-shell has been restored and requires a profile * Add grails.codegen.defaultPackage required by profile commands
Fix of GRAILS-10335. If the property in a domain class has a custom Hibernate UserType, then the UserType is responsible for mapping this column to the database and overrides Grails mapping of Map, List, Set and Bag types.
With this patch it's possible (for example) to map Map<String, String> to a Postgresql native Hstore column type instead of the additional table created by default by Grails.