grails/grails-data-mapping — pull request #35 by SAgrawal14 (2014-08-22 07:49:05+00:00)
Title: MongoDB enum id number support

## 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/causecode/grails-data-mapping/compare/grails:master...mongo-enum-number#diff-ce0fefe1d4dc415ed55802d866b73408L131, 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 no id (default behavior).