Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPMONGODB-346: Seems to be ignoring databaseName attribute specified in DataSource.groovy #302

Closed
graemerocher opened this issue Jan 24, 2014 · 0 comments

Comments

@graemerocher
Copy link
Member

Original Reporter: richsad
Environment: Mac OS X 10.9.1, Grails 2.3.4, JDK 1.6.0_65-b14-462-11M4609
Version: 1.3.3
Migrated From: http:https://jira.grails.org/browse/GPMONGODB-346

First time using this plugin. Added the following:
mongo {
host = "localhost"
port = 27107
databaseName = "grailsdev"
}
to the environments.development section of DataSource.groovy. Created a domain class with static mapWith = "mongo" (this project uses Hibernate too).

Create an instance of the domain class in BootStrap.groovy and save() it. I see the data stored in mongoDB as expected, but it is not in a database called grailsdev. Instead it is stored in a database with the name of the grails project.

The only reason I noticed this is I tend to specify different database names for development, test and production environments (development and test use a localhost-based install). Given that is using the project name for a database name the development and test environments will use the database which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant