Questions tagged [seeding]
525 questions
3
votes
0 answers
How to Seed Data to H2 DB in Spring Boot App with JPA
A little bit of background:
I work on a Spring boot app in a large corporation and we have no control over the Database Schema, table names, and column names. Because of this, our table and column names have no obvious meaning to them.
We are…

Justin Hoyt
- 148
- 1
- 9
3
votes
2 answers
How to seed a user identity properly in asp core2?
I have this seeding class which keeps failing to insert a record in the users table,
I believe that using CreateAsync is not proper since the method is not async the user manager does not seed the record. so I tried to seed manually using hashed…

JSON
- 1,583
- 4
- 31
- 63
3
votes
2 answers
Ruby on Rails - Seeding big data (over 2.7M) record to production database
In my application I have a City model. I have a sql file that contains all the cities in the world (its over 2.7M) & I need to seed all of them to my production server.
I know usually I could do this in seeds.rb:
cities = City.create([
{id: 1,…
user7383466
3
votes
1 answer
Rails database seeding by calling controller methods
I would like to seed my testing database with a number of "League" models. In my leagues_controller, the create method not only creates the league, but also calls a number of initialization methods that are pertinent to each league model. As far as…

Nathan Lauer
- 381
- 5
- 18
3
votes
2 answers
Dotnet core 1.1 on linux: Any particular way thats better than others when seeding data with EF Core?
I was thinking about just doing a migration, and seeding the data in that migration. I am not sure if i want seeding to be part of my migrations, maybe there comes a time when i want a clean slate.
Last time i did asp.net about a year ago on…

DenLilleMand
- 3,732
- 5
- 25
- 34
3
votes
3 answers
How do I seed a database for Rails app on AWS Elastic Beanstalk
I built a small Rails app locally and am trying to deploy it to AWS Elastic Beanstalk.
This is the guide I have been following:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html
The deployment was successful but the…

Sheridan Gray
- 698
- 1
- 9
- 23
3
votes
3 answers
Seeding not working in Entity Framework Code First Approach
I am developing a .Net project. I am using entity framework code first approach to interact with database. I am seeding some mock data to my database during development. But seeding is not working. I followed this link -…

Wai Yan Hein
- 13,651
- 35
- 180
- 372
3
votes
0 answers
Seeding Words to LDA model in R/Python
I want to do LDA topic analysis over a huge corpus. I have tried that in R and Python. Now I'd like to seed special words into the model. That means that I have some prior probability for some words associated with topics and I want seed these to…

DA_PA
- 231
- 1
- 4
- 10
3
votes
1 answer
Fill a new colum from another columns before I delete them during migration
I am using Entity Framework - Code First. The databse is already filled.
I must add a colum to a table and remove two others columns. The new colum will be filled with a merge of the old columns.
I am trying to use migrations and the seed method.
I…

Simone
- 2,304
- 6
- 30
- 79
3
votes
1 answer
Entity Framework Core 1.0 - How to seed a large amount of data
I am using an ASP.NET Core 1.0 (previously known as ASP.NET 5) application with the core framework and Entity Framework Core 1.0 (previously known as Entity Framework 7).
In this blog…

diegosasw
- 13,734
- 16
- 95
- 159
3
votes
3 answers
Seeding Many-To-Many data
Hello I'm trying to create some seeds for my project, but I'm having trouble seeding the Many-To-Many relationship data to the db.
My database looks like this:
in TeacherSkills, Teacher_ID and Skill_ID are foreign keys for their tables ofcourse.
My…

Nicolas
- 4,526
- 17
- 50
- 87
3
votes
1 answer
Laravel seeding with relationship Eloquent\Builder failing
I'm trying to seed my database with like this:
factory(App\User::class, 1)
->create()
->each(function($u) {
$role = factory(App\Role::class)->create();
$u->role()->save( $role );
});
and these are my model…

Jakub Kohout
- 1,854
- 3
- 21
- 36
3
votes
2 answers
Rails: Validation fails for ActiveRecord in setting a random Boolean Attribute
I am trying to save a boolean value in a model by seeding it
20151130014042_create_duty_statuses.rb
class CreateDutyStatuses < ActiveRecord::Migration
def change
create_table :duty_statuses, :id => false do |t|
t.string :id, limit: 36,…

james
- 515
- 4
- 14
3
votes
2 answers
using sequelize-cli db:seed, schema is ignored when accessing Postgres
i am building a web service using express.js and Sequilize with a Postgres DB.
Database holds a table 'country' under schema 'schema1'. Table 'country' has fields 'name', 'isoCode'.
Created a seed file to insert a list of countries inside table…

Alexandros Monastiriotis
- 71
- 1
- 6
3
votes
4 answers
I can't seem to generate PsuedoRandom numbers based on co-ordinates
I am trying to create an infinite map of 1 and 0's procedurally generated by PRNG but only storing a grid of 7x7 which is viewable. e.g. on the screen you will see a 7x7 grid which shows part of the map of 1's and 0's and when you push right it then…

Munkybunky
- 173
- 1
- 7