Questions tagged [bulk-create]
12 questions
3
votes
2 answers
Manual Post Save Signal creation makes the application slow, Django
We have a Django application that uses Django-river for workflow management. For performance improvement, we had to use bulk_create. We need to insert data into a couple of tables and several rows in each.
Initially, we were using the normal .save()…

kallada
- 1,829
- 4
- 33
- 64
2
votes
2 answers
How to add multiple rows to a SQL database with MySQL on a REST application
I am developing a backend route for my application and it needs to add multiple rows (one row for each item in an array received from the client client). My first thought is to just do a for loop through my data and do a database query for each…

Toacin Patwary
- 23
- 3
2
votes
0 answers
How to use soft deleted rows in bulkCreate sequelize
I have 2 tables in mysql Serviceability and ServiceabilityLive, the first table is updated by ops team and second table is updated cron at given time.
I am using below code to update the same in live table but it is not working.
const…

Sahil Paudel
- 416
- 4
- 14
1
vote
0 answers
Django 4.1 : bulk_create() can only be used with concrete fields in update_fields
I try to use the new arguments updata_fields and unique_fields in Django 4.1, but I realy don't know what to do about this error...
Here is my model :
class Sequence(models.Model):
id = models.CharField(max_length=50, primary_key=True)
…

AxlLvy
- 11
- 4
1
vote
1 answer
Django bulk_create using a list of random fields without a hardcoded query
I am trying to create new instances in my Django model using bulk_create().
My models are:
Class Emotion(models.Model):
emotion_grp_id = models.AutoField(primary_key=True, ...
emotion_group = models.CharField(max_length=55, ...
Class…

carla
- 141
- 9
1
vote
2 answers
How do I get created objects as a query set from django bulk_create?
I am making use of bulk_create on a Django model. How can I get the values of the created object so I can proceed to make use of it, without querying the db again?

Pascal Ezeama
- 11
- 2
0
votes
0 answers
Sequelize bulkCreate behavior when failures occur
What is the actual behavior of bulkCreate in case only one insert fails? The whole process is cancelled, or the remaining lines are inserted?
I read on some forums that the behavior would be equivalent to Promise.all() so that no lines are inserted…
0
votes
1 answer
Django bulk_create() with models' fields having custom validators
In my Django application, I am using bulk_create(). For one of the fields in a target model I have assigned a set of validators to restrict the allowed value to uppercase letters (alphabets) and to a fixed length of "3", as shown below:
class…

carla
- 141
- 9
0
votes
1 answer
How to check update and insert while using bulkCreate in node.js
I am using node.js to upload an excel file into the database, in my service i am using bulkCreate to upload the data into the mysql db.Let me post the table structure
table name : customer_details
columns:
customer_org_id INT,
customer_name…

Mandrek
- 1,159
- 6
- 25
- 55
0
votes
1 answer
insert to the table inside loop or bulk insert with django
i need to insert all products in the Cart table to the table called (OrderItem), I have used this code:
neworder.save()
new_order_items = Cart.objects.filter(user=request.user)
for item in new_order_items:
…

Osama Mohammed
- 2,433
- 13
- 29
- 61
0
votes
1 answer
how to update multiple fields via
how to update multiple fields via
Model.objects.bulk_create(list)
I try it
Model.objects.bulk_create(list).update(startD=startD, endD=endD)
but error show 'list' object has no attribute 'update'

Ailan
- 1
- 1