This repository was archived by the owner on May 21, 2026. It is now read-only.
Repository navigation
MongoDB enum identity number support - #41
Merged
Merged
Conversation
added 9 commits
August 25, 2014 15:55
storing in Basic.java holder.
EnumType and hence fixed query when using ordinals.
Author
|
Reference #35 |
graemerocher
added a commit
that referenced
this pull request
Sep 12, 2014
MongoDB enum identity number support
Author
|
Thank You @graemerocher for replying. |
Author
|
@graemerocher How can I use the changes added in this pull request for grails version 2.4.4 and mongodb 3.0.2. I'm unable to use that. |
Author
|
Actually its not available in jar of 3.0.2.RELEASE. Can you please do another release to make it available? |
Contributor
|
We have not yet released a new version of mongodb, we can certainly do that shortly |
Author
|
Thank You @graemerocher for reply. We are waiting on new release. |
jdaugherty
pushed a commit
to jdaugherty/grails-data-mapping
that referenced
this pull request
Jan 16, 2025
It is happening because of `GrailsWebUnitTest.super.applyTemplate`. Either we need to add check if GrailsWebUnitTest is resolved or we could simply call super.applyTemplate from parent traits.
jdaugherty
pushed a commit
to jdaugherty/grails-data-mapping
that referenced
this pull request
Jan 16, 2025
apache#41 Fixed BUG! exception in phase 'semantic analysis'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Notes
Problem
Please see http://stackoverflow.com/questions/23888644/saving-enum-with-custom-id-in-grails-mongodb for detailed description of the requirement.
Solution
Previously, enums are treated as simple type https://github.com/grails/grails-data-mapping/blob/3.x/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/model/MappingFactory.java#L131, but now first checking if enum has a user type then marking it as custom type.
Added enum type marshaller to support enum number conversion (in read, write & query operations) and also support enums with ordinal mapping and enum with no id (default behavior).
Reverted the commit 6ee2e12 and added support in new EnumType. This enhanced & fixed querying a domain class with an enum which is mapped as ordinal.