apache / apache/grails-core

Request scoped bean databaseName+"DB" is not working

Open
#14,401 0 comments 0 reactions 0 assignees View on GitHub
relates-to: grails-data-mongodb
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

As per http://gorm.grails.org/latest/mongodb/manual/index.html#lowLevelApi

> A request scoped bean is also available for the default database (typically the name of your application, unless specified by the databaseName config option, plus the suffix "DB").

This doesn't seem to be working. Can you please update the documentation or if it's a bug please fix it.

I have the following in databaseName = 'lm' and using `def lmDB` in controller doesn't work.

Contributor guide

Open the contributing guide

Research direction

Start with the MongoDB manual's low-level API section and the databaseName configuration described in the issue. Reproduce the controller's `def lmDB` lookup with `databaseName = 'lm'`, then determine whether the documented bean name is incorrect or the request-scoped bean is missing; done means either corrected documentation or a verified fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, mongodb
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.