Do not load all one-to-many relationships in <f:display bean="${myBean}">
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
Tag f:display is used in scaffolding. Opening some scaffolded view with one-to-many relationship having thousands of relations loads everything from database. This usually breaks the server.
I know I can use `except` to omit certain bean property. However, I'd like to have it in the view. I can think of two possible fixes:
1. Introduce `omitValue` something similar to `except` which would not load the value. Then you can do whatever you want in `_displayWidget.gsp`
2. Limit number of relationships loaded. Maybe also using some tag property.
Contributor guide
Research direction
Start by tracing the f:display tag used by scaffolding and the _displayWidget.gsp mentioned in the issue, including how the existing except option affects bean properties. Reproduce the problem with a one-to-many property containing thousands of relations, then determine whether the completed change should omit loading the value or limit relationships while still displaying it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100