gorm


Script for saving large no of entries in mongodb


I have a mongodb database server.I want to get it fill up with large number of entries in a particular collection let say a collection named "user".
I want to know if there would be a script for saving large no of randomly created entries in my mongodb database from linux terminal or a Java code for the same.
I have a script that creates 10,000 entries in "user" collection:
> for(i=0;i<10000;i++){db.user.insert({username:'ashok'+i,password:'123'});}
This query creates the user names as ashok1 , ashok2 ,....
I want a script that could create random user names.
It could be better if I could get this done in grails.

Related Links

Grails 3 GORM - must have same number of columns as the referenced primary key issue
“grails.mongodb.default.mapping” equivalent in application.yml in Grails 3.2
TenantId is null when saving an entity in a Discriminator based multi tenant application in Grails 3.2 with GORM 6
Grails 3 (unsaved) instance issue while fetching from database (GORM)
Can't use get() in domain using Grails3
GORM findAll + cannot pass dynamic List as named parameter
How to display database records in grails
Configure Grails 3.0.9 for Oracle 12c with identity PK?
Adding condition to findAll and findAllBy methods
Neo4j and Mongodb as datasource in Grails
GORM (varchar .save(), non DATE): ORA-01861: literal does not match format string
GORM addTo methods not found in Spock test
spring-boot property exception while externalizing datasource properties and using actuator
Mapping hasMany relation and saving the related data
Method on class [] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails Correctly
What happens when two app servers in cluster start LiquiBase update (via Grails)?

Categories

HOME
compiler-construction
wso2
keycloak
magnific-popup
xmpp
leon
jgroups
jxls
binary-tree
sql-server-2016
indesign
metatrader4
mapserver
task
workload-scheduler
evopdf
lldb
dbext
tapestry
php-openssl
tdd
dynamic-featured-image
bootstrap-duallistbox
fifo
buck
c++-amp
directx-10
preg-match-all
contact-form
vsts-build-task
nssegmentedcontrol
ios5
withings
webdriver-manager
mapzen
fedex
import-from-excel
rainbowtable
atomicity
theming
boost-multi-index
alphabet
csound
kbuild
android-cursor
np-complete
boost-preprocessor
pearson
blacklist
medium.com
fuzzy-search
hill-climbing
bluemix-app-scan
revolution-r
independentsoft
xpath-1.0
associative-array
system.management
javax.sound.midi
hsv
comobject
tmuxinator
ios9.1
fluid-dynamics
ami
apache-commons-net
website-monitoring
websocket4net
typeof
p4java
marmalade
xceed-datagrid
hyprlinkr
algebraic-data-types
dbconnection
jplaton
shellexecute
sqlperformance
sharp-repository
buildr
nsdatecomponents
nsobject
vdsp
javax.script
yetanotherforum
celltable
routedevent
dbal
rescale
audio-capture
adrotator
django-notification
document-conversion

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App