Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Charles Lee
I have an idea. 1. `bulk_create` all companies. 2. `Filter`(SELECT) all `Company` and make it dictionary for retrieving company fast. 3. 1. company_dict = { ’Name’: ‘pk’, ... } 4. Create a list of `CompanyValue` with company name and company_dict.

Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Charles Lee
I have an idea. 1. `bulk_create` all companies. 2. `Filter`(SELECT) all `Company` and make it dictionary for retrieving company pk fast. 3. 1. company_dict = { ’Name’: ‘pk’, ... } 4. Create a list of `CompanyValue` with company name and