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://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.