Index column of child domain class should not be nullable
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Task List
- [X] Steps to reproduce provided
- [ ] Stacktrace (if present) provided
- [X] Example that reproduces the problem uploaded to Github
- [X] Full description of the issue provided (see below)
### Steps to Reproduce
1. Clone [this repo](https://github.com/donalmurtagh/grails-list-index-bug)
2. Create a MySQL database on localhost named `list_index` that can be accessed by the `root` user with a blank password
3. Start the application with `grails run-app`
### Expected Behaviour
The `images_idx` column of the `image` table should not be nullable, because each image should have an index
### Actual Behaviour
The `images_idx` column of the `image` table is nullable
### Environment Information
- **Operating System**: Mac OS X
- **GORM Version:** 6.1.9.RELEASE
- **Grails Version (if using Grails):** 3.3.5
- **JDK Version:** 1.8.0_66
### Example Application
- https://github.com/donalmurtagh/grails-list-index-bug
Contributor guide
Research direction
Start with the linked grails-list-index-bug example application and run it with `grails run-app` against the stated MySQL database. Inspect the generated `image` table and its `images_idx` column; done means the column is created as non-nullable while preserving the child domain class behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100