Questions tagged [populate]

This is a general tag used when applying structured or unstructured data into a context.

This is a general tag used when applying structured or unstructured data into a context.

It doesn't necessarily mean that any kind of triggering of logic is in place. In case this is happening it should be mentioned in the question.

1176 questions
118
votes
16 answers

Mongoose populate after save

I cannot manually or automatically populate the creator field on a newly saved object ... the only way I can find is to re-query for the objects I already have which I would hate to do. This is the setup: var userSchema = new mongoose.Schema({ …
Pykler
  • 14,565
  • 9
  • 41
  • 50
111
votes
10 answers

Mongoose: deep population (populate a populated field)

I have Category model: Category: ... articles: [{type:ObjectId, ref:'Article'}] Article model contains ref to Account model. Article: ... account: {type:ObjectId, ref:'Account'} So, with populated articles Category model will…
f1nn
  • 6,989
  • 24
  • 69
  • 92
53
votes
10 answers

How to populate a table with a range of dates?

I need a MySQL table to hold ALL DATES between 2011-01-01 and 2011-12-31. I have created a table with one column names "_date", type DATE. With what query can I populate the table with all the desired dates (instead of having to enter them by hand)?
Pr0no
  • 3,910
  • 21
  • 74
  • 121
51
votes
9 answers

Sails.js populate nested associations

I've got myself a question regarding associations in Sails.js version 0.10-rc5. I've been building an app in which multiple models are associated to one another, and I've arrived at a point where I need to get to nest associations somehow. There's…
Lars Dol
  • 765
  • 1
  • 6
  • 14
49
votes
4 answers

Is there any framework for .NET to populate test data?

I am use c# and for unit testing and integration testing usually I need to populate fields automatically based on attributes. Lets say we will test if we can write and get back user data to database. I create a user object populate fields write…
ilker Aksu
  • 619
  • 1
  • 5
  • 8
45
votes
4 answers

Pandas populate new dataframe column based on matching columns in another dataframe

I have a df which contains my main data which has one million rows. My main data also has 30 columns. Now I want to add another column to my df called category. The category is a column in df2 which contains around 700 rows and two other columns…
user3471881
  • 2,614
  • 3
  • 18
  • 34
32
votes
3 answers

Mongoose nested query on Model by field of its referenced model

It seems like there is a lot of Q/A's on this topic on stackoverflow, but I can't seem to find an exact answer anywhere. What I have: I have Company and Person models: var mongoose = require('mongoose'); var PersonSchema = new mongoose.Schema{ …
AzaFromKaza
  • 768
  • 1
  • 10
  • 24
27
votes
2 answers

WPF ListView - how to add items programmatically?

Even if I know it's not ideal - I need to programmatically populate a listView (for whatever reason). I am declaring my columns in the markup:
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
25
votes
4 answers

Best practice to populate static data using a Visual Studio 2010 database project?

How do you populate your database with static, source-controlled data using a Visual Studio database project? I have tried all three strategies below, finding each one to be progressively better than the last. I am using but not completely satisfied…
Tim Partridge
  • 3,365
  • 1
  • 42
  • 52
24
votes
5 answers

Create an array with a specified number of elements

I am extremely new at php and I was wondering if someone could help me use either a for() or while() loop to create an array of 10 elements.
Mike
24
votes
2 answers

How to populate a TableView that is defined in an fxml file that is designed in JavaFx Scene Builder

I would like to know how do I populate a TableView with data... All the examples I have seen creates a TableView with columns and everything and add it to the scene. All done in the java code itself. What I want to know: if I design my "form" in…
cp5
  • 1,087
  • 6
  • 26
  • 58
22
votes
3 answers

Use jquery to re-populate form with JSON data

I have an HTML form, that I save to the database via ajax. To get the query string of key/value pairs, I have used the very convenient serialize function, like this: var myData = $("form#form_id").serialize(); $.ajax({ url:…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
19
votes
6 answers

Mongoose: Populate a populated field

I'm using MongoDB as a log keeper for my app to then sync mobile clients. I have this models set up in NodeJS: var UserArticle = new Schema({ date: { type: Number, default: Math.round((new Date()).getTime() / 1000) }, //Timestamp! user:…
Francesc
  • 1,339
  • 4
  • 16
  • 34
18
votes
1 answer

Populate a tableview using database in JavaFX

I'm starting to learn javaFX and I need to populate a table with data from my database. I've read a lot of code online, but I haven't found what I was looking for. I read this but I don't know how to implement that last function. I read some other…
Andre
  • 617
  • 2
  • 6
  • 10
17
votes
1 answer

Mongoose query a populated field

db.History.find({'_file.project': 'someproject' ) .populate('_file', 'name reference project') .sort(sortField || '-created') .limit(max || 64) .exec(this); Here I'm trying to find all documents which match on a populated…
Thijs Koerselman
  • 21,680
  • 22
  • 74
  • 108
1
2 3
78 79