Skip to content

Conversation

@ilopmar
Copy link
Contributor

@ilopmar ilopmar commented Aug 12, 2013

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.

@ilopmar
Copy link
Contributor Author

ilopmar commented Aug 29, 2013

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.

@graemerocher
Copy link
Contributor

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

@ilopmar
Copy link
Contributor Author

ilopmar commented Sep 4, 2013

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.

@graemerocher
Copy link
Contributor

The tests are in the individual hibernate plugins. See https://github.com/grails-plugins/grails-hibernate-plugin

@ilopmar
Copy link
Contributor Author

ilopmar commented Sep 6, 2013

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.

@mattfeury
Copy link

i'd love to give a second request for merge on this. this is pretty clutch functionality for any of us using postgres.

graemerocher added a commit that referenced this pull request Sep 17, 2013
GRAILS-10335 - Override Grails mappings for collections when property is mapped with a custom Hibernate UserType Edit
@graemerocher graemerocher merged commit abb20c3 into apache:2.2.x Sep 17, 2013
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jan 15, 2025
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Apr 14, 2025
…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.
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Apr 14, 2025
* 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
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Apr 14, 2025
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.
jdaugherty added a commit that referenced this pull request Apr 17, 2025
jdaugherty added a commit that referenced this pull request Apr 22, 2025
Updating for grails-publish plugin change
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jun 28, 2025
…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
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.

3 participants