Open srggrs opened 4 years ago
I've realised the problem with this method is that you cannot return the primary key values when doing the COPY
command.
I'm not sure what the best way would be in order to obtain the id values if we were to use this method - in that how would you guarantee you had the right id for the right object.
bulk_create can be improved by using django-postgres-copy as suggested in https://pmbaumgartner.github.io/blog/the-fastest-way-to-load-data-django-postgresql/ also would be great writing some test using Faker as showed in the article.